Home » Search

About OneToOne

11-20 of 62Refresh
Forum
25

@OneToOne query issue with OR and IS NULL

Hello, I'm struggeling to get a query run right. I have 2 entities (simplified) class A {     @Id     @GeneratedValue     private Long key;          @OneToOne(mappedBy = "other", cascade ...     private Long key;     private int counter;     @OneToOne     private A other; } so entity B
Forum
25

A bidirectional OneToOne association with a shared primary key

Hi, In Hibernate, it is possible (using Hibernate specific annotations) to define a bidirectional @OneToOne association that has a shared primary key, example: http://fruzenshtein.com/bidirectional ... @OneToOne annotations with no mappedBy): @Entity public class Entity1 {     Entity2 e2
Manual
24

Detached Entity Objects

): @Entity class Employee { : @OneToOne(cascade=CascadeType.DETACH) private Address ... ): @Entity class Employee { : @OneToOne(cascade=CascadeType.MERGE) private Address
Manual
24

Retrieving JPA Entity Objects

FetchType.LAZY in either @OneToOne or @ManyToOne annotations (currently ObjectDB does not distinguish ... { : @OneToOne(cascade=CascadeType.REFRESH) private Address address; : } In
Manual
17

Storing JPA Entity Objects

{ : @OneToOne(cascade=CascadeType.PERSIST) private Address address; : } In
JPA Doc
11

javax.persistence.JoinColumn

getOrders() {return orders;} Since: JPA 1.0 See Also: ManyToOne OneToMany OneToOne JoinTable ... . If the join is for a OneToOne or ManyToOne mapping using a foreign key mapping strategy ... of the target entity. If the join is for a ManyToMany mapping or for a OneToOne or bidirectional ManyToOne
JPA Doc
11

javax.persistence.PrimaryKeyJoinColumn

to a primary table; and it may be used in a OneToOne mapping in which the primary key ... OneToOne String columnDefinition (Optional) The SQL fragment that is used when generating the DDL ... . This should not be specified for a OneToOne primary key association. Defaults to the generated SQL to create
JPA Doc
7

JoinColumn.name

Annotation Element javax.persistence.JoinColumn String name (Optional) The name of the foreign key column. The table in which it is found depends upon the context. If the join is for a OneToOne or ... is for a ManyToMany mapping or for a OneToOne or bidirectional ManyToOne/OneToMany mapping using a join table
JPA Doc
7

JoinColumn.table

of the applicable entity. Default: If the join is for a OneToOne or ManyToOne mapping using a foreign ... of the target entity. If the join is for a ManyToMany mapping or for a OneToOne or bidirectional
JPA Doc
5

javax.persistence.AssociationOverrides

protected Integer version; @ManyToOne protected Address address; @OneToOne