 1 | (I had raised this issue in the past and have finally had time to come back to it and strip down the classes to a minimum). The problem seems to lie in having bidirectional links (viz, I have @OneToMany Map children and @ManyToOne Entry parent in my classes. I've attached |
 1 | hi, what is the purpose of annotating a field with a RDB relationship shuch as OneToMany. ManyToMany etc? Using these annotations is optional in ObjectDB but required by standard JPA. You still need these annotations in ObjectDB to specify cascading / fetch policy and other settings. sprintf |
 1 | ();
emf.close();
}
@Entity
public static class A {
@OneToMany |
 1 | uUid;
...
@OneToMany(fetch=FetchType.LAZY)
public Set workflow = new HashSet |
 1 | Dear Sirs, I have an object A, that has a OneToMany FetchType.EAGER List of objects B, that has a field with a reference to an object C. I have this code:
ClassA objectA = em.find(ClassA.class, 1);
for (ClassB objectB : objectA.getListB()) {
ClassC objectC = objectB.getObjectC();
} em |
 1 | I'm having an issue with my application, and I'm hoping you guys will be able to help. Please forgive typos and obvious errors, I'm having to retype from a non-internet connected network. A contrived example is:
@Entity
public class Salesman
{
private String name;
@OneToMany(fetch |
 1 | an annotation to a reference:
@OneToMany(cascade=CascadeType.PERSIST)
private List children |
 1 | , and each User have a list of books which the user own defined as @OneToMany(fetch=FetchType.LAZY) List |
 1 | mainLanguage;
@OneToMany(fetch = FetchType.LAZY)
private List languages |
 1 | MyEntity1 { @OneToOne private MyEntity2 myEntity2; @OneToMany private List |