Home » Search

About OneToMany

71-80 of 145Refresh
Forum
1

Merge with Parent/Child entities not possible

; import javax.persistence.MapKey; import javax.persistence.OneToMany; import javax.persistence ... public static class ParentEntity {   @Id   @GeneratedValue   private long id;   @OneToMany(fetch
Forum
1

NoSuchFieldError: __odbTracker on NetBeans 7.3 + JBoss 7.1.1

serialVersionUID = 1L; @ManyToOne @Index private City city; @OneToMany ... serialVersionUID = 33L; @OneToMany(mappedBy = "city") private List persons
Forum
1

Object explorer cannot open odb file. ObjectDB many-to-many relationship

I created a data model to test many-to-many relationship with a link table as following (full code in attachement) @Entity public class User {     @Id     private String code;     @OneToMany ... public class Project {     @Id     private String code;         @OneToMany(mappedBy = "project
Forum
1

OEM enhancing

Hello, I have question regarding OEM licence enhancement. @OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL) private SomeClass[] props; @OneToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL) private Map vars = new TreeMap
Forum
1

orphanRemoval = true not working when CascadeType.REMOVE is disabled

Dear all, I have entities Employee and Address, their relation is defined (full example in attachment): @Entity     public static class Employee { ....         @OneToMany(orphanRemoval = true ... try use  @OneToMany(cascade = CascadeType.REMOVE) Address entities used Employee (id=1) deleted
Forum
1

Performance and memory usage of queries

javax.persistence.FlushModeType; import javax.persistence.OneToMany; import javax.persistence ... {   @OneToMany(cascade = CascadeType.ALL)   private List list = new ArrayList
Forum
1

Persisting collection where members are subclasses

OK, I have a number of classes which are all subclasses of Entry (e.g., Folder, Link, Book). In the Folder class, there is a @OneToMany Map children If I store something in that map ... Folder extends Entry {         String name;         @OneToMany(cascade=CascadeType.PERSIST
Forum
1

PostUpdate collection null

, the collection is populated. The collection is eagerly fetched. public class MyEntity {     @OneToMany(fetch ... ;                 @OneToMany(fetch=FetchType.EAGER, cascade=CascadeType.PERSIST)         List
Forum
1

problem with lazy loading - unittest project attached

hi, i'm still testing objectdb together with spring-data-jpa. i made a test which should simulate 4 requests 1. save entity 2. read an existing entity, add onetomany relation 3. read an existing entity, add another onetomany relation 4. read entity, get relations. i have the feeling this is not
Forum
1

Removing an entity throws exception

; @OneToMany(mappedBy = "customer", fetch= FetchType.LAZY) private List itemList; @OneToMany(mappedBy = "customer", fetch= FetchType.LAZY) private List