Home » Search

About OneToMany

131-140 of 149Refresh
Forum
1

Possible issue for JPQL IS EMPTY expression

bidirectional and not a field: @Entity class MyEntity { @OneToMany(mappedBy="myentity") ArrayList
Forum
1

Problem persisting a TreeSet field

Hello, I am getting a "java.lang.IllegalArgumentException: Can not set java.util.TreeSet field Message.children to java.util.HashSet" when persisting a Message object with a parent/children relationship: @ManyToOne private Message parent; @OneToMany(mappedBy = "parent") private TreeSet
Forum
1

Problem with @OrderBy

When I use @OrderBy and supply multiple order fields I get and error when ObjectDB Explorer expands a instance of the entity. Example code: @Entity @Table(name="Defects", schema = "myDB") public class Defects implements Serializable {     ...     ...     @OneToMany(mappedBy="defect
Forum
1

Problem with bidirectional link

(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
Forum
1

Relationship Annatations

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
Forum
1

Remove not working

(); emf.close(); } @Entity public static class A { @OneToMany
Forum
1

removed objects stay with null field values in the reference

uUid; ... @OneToMany(fetch=FetchType.LAZY) public Set workflow = new HashSet
Forum
1

Retrieval by Access bug?

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
Forum
1

Selective merge/cascade of detatched entity

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
Forum
1

Storing objects problem

an annotation to a reference:   @OneToMany(cascade=CascadeType.PERSIST)   private List children