About OneToOne
javax.persistence.OneToOne
Defines a single-valued association to another entity that has one-to-one multiplicity.(Annotation of JPA)
JPA Entity Fields
Explains how to define and use primary keys in JPA, including composite and embedded primary keys.... with one of the following annotations: OneToOne javax.persistence.OneToOne JPA annotation Defines a single-valued association to ...
JPA Annotations for Relationships
Reference (JavaDoc) of JPA 2 relationship annotations, including @ManyToMany, @ManyToOne, @OneToMany, @OneToOne, @OrderBy and @MapKey.... javax.persistence.OneToMany javax.persistence.OneToOne Unlike ORM JPA implementations, ObjectDB does not ...
Version 2.2.7 build 7/8 issue
Hi all, I have problems with builds 7 and 8 when trying to sort entities with mappedBy and my own method in query. This query "SELECT c FROM Customer c order by c.getNormalizedName()" returns List with null objects! With builds 6 and 5 works it correctly. Removing mappedBy from @OneToOne(mappedBy = "address") also helps. My code: ... builds 6 and 5 works it correctly. Removing mappedBy from @OneToOne(mappedBy = "address") also helps. My code: public ... private String name ; @ OneToOne ( cascade = CascadeType . ALL , fetch = ...
Mysterious "Attempt to persist a reference to a non managed instance" error
I've been working with ObjectDB for the past several months, and it's behaved pretty much as expected. I made a few modifications to a working set of classes today, and it's started throwing exceptions at commit time. I've stripped it down to a set of files that seem to be of trivial complexity, but it's still failing. It involves two entities, Index and Ostrich. The thing to note is that the Index structure is recursive through maps; but that's never caused any problem for me in the past. ... ManyToMany ; import javax. persistence . OneToOne ; import static javax. persistence . CascadeType ... private long id ; @ OneToOne ( fetch = EAGER , cascade = PERSIST ...
ClassCastException after upgrade to 2.3.5_03
On upgrading to the latest version of objectdb I get the following exception on object retrieval: ... { @ Id String id ; @ OneToOne ( orphanRemoval = true , cascade = ... ) private Object payload ; @ OneToOne ( orphanRemoval = true , cascade = ...
New entity objects are duplicated on merge cascading
When merge is cascaded to a new entity object that has not been persisted yet - it becomes persisted twice. This was demonstrated by a Java EE application in this forum thread but may be reproduced also in a simple console test case: ... long id ; @ OneToOne ( fetch = FetchType . LAZY , cascade ... ) A owner ; @ OneToOne ( fetch = FetchType . LAZY , cascade ...
Problem with @Basic(fetch = FetchType.LAZY)
I have a class where two fields are annotated with @Basic(fetch = FetchType.LAZY) due to them containing quite long Strings and me loading ALL entities of the database on application startup (swing app) This class should hopefully demonstrate the problem: ... So I replaced my original code with @ OneToOne ( fetch = FetchType . LAZY , cascade ... private LargeString description ; @ OneToOne ( fetch = FetchType . LAZY , cascade ...
javax.persistence.AssociationOverrides
Used to override mappings of multiple relationship properties or fields.(Annotation of JPA)
Attribute.PersistentAttributeType.ONE_TO_ONE
One-to-one association(Enum Constant of javax.persistence.metamodel.Attribute.PersistentAttributeType)