Home » Search

About OneToMany

71-80 of 143Refresh
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

LAZY @ManyToOne field functions as EAGER

would expect b.cLazy to not be still resolved. [By constrast, using this approach an unmapped @OneToMany list is not still viewable, although a mapped @OneToMany list is, which I will discuss in
Forum
1

Extra uninitialised entities spawned on merge()

In the following, Element is a base entity class, with a bi-directional @ManyToOne-@OneToMany relationship Element owner - List ownedElements, and Example is a subclass entity ... ArrayList();         @OneToMany(mappedBy = "owner",         cascade = CascadeType
Issue
1

After using the enhancer, Lazy loaded collections are no longer loading. They are set as null

(Long id) { this.id = id; } @OneToMany(cascade={CascadeType.MERGE ... static class Account     {         @Id         protected Long id = 1L;         @OneToMany(cascade
Forum
1

Cannot sort descending, when ordering by caluculated float in a method

amount + "*" + price;         }     }     @Entity     public static class Invoice {         @OneToMany ... : @Entity public class Invoice { @OneToMany(mappedBy = "invoice", fetch= FetchType.EAGER
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
Issue
1

spuriously objectdb objects have null references

){ } } } ...   the reference definitions are (for the null references above): ... @OneToMany(fetch=FetchType.LAZY) @Index public List actions = new ArrayList(); ... @OneToMany
Forum
1

Removing an entity throws exception

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

mappedBy problem

If I put the mappedBy element to the @OneToMany, the owned side (the many side) will never persist ! for example @Entity public class Employee { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) public Long id; public String name; @OneToMany(targetEntity=Address.class