About OneToMany

51-60 of 150Refresh
Forum
2

On initialisation of lists: impact on migration from EclipseLink to ObjectDB

() @OneToMany(cascade=CascadeType.ALL) public List getBlocks() { return blocks ... = new ArrayList(); @OneToMany public List getBlocks() { return blocks ... . There are cases where one should explicitly init such a @OneToMany list anyway, namely when an entity
Issue
2

Once served to JSF page via @EJB query bean, many list fields are null (but same query ok after fresh persist in @PostConstruct)

, but the same problem happens to  uni-directional @OneToMany fields, and also there seem to be some simple ... = new ArrayList(); @OneToMany(mappedBy = "owner", cascade = CascadeType.ALL) public ... the list field values becomes null (in my larger real-world application, lots of other @OneToMany
Forum
2

can't get HashMap out of the database

. The full Eclipse project attached FYI. Thanks, Natalia.     Try annotating the map with @OneToMany ... implements Serializable { private String name; private Date signingDate;     @OneToMany ... GuestHolder { // Persistent Fields: @Id @GeneratedValue Long id; @OneToMany(fetch
Forum
2

Does ObjectDB support lazy loading?

class which contains List, marked with @OneToMany. After persisting a Parent object, (in ... to @OneToMany(fetch=FetchType.EAGER), the properties can be read. It seems to me that ObjectDB doesn't ... @GeneratedValue Long id; @OneToMany(fetch=FetchType.LAZY, cascade=CascadeType.ALL) List list
Forum
2

Merge Issue: Attempt to reuse an existing primary key value

();     }     @Entity     static class A {         @OneToMany(cascade=CascadeType.ALL)         List list ... ();     }     @Entity     static class A {         //@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, mappedBy = "parent")         @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType
Issue
2

NullPointer when accessing persistent field

dependencies )   The code being called is accessing a map declared as follows; @OneToMany(cascade ... static class A {         @OneToMany(targetEntity = B.class, mappedBy = "a")         private ListOneToMany(cascade
Forum
1

"Failed to serialize instance" of Set problem

Hi, I'm trying to persists objects defined as follows: @Entity @Inheritance(strategy = InheritanceType.SINGLE_TABLE) public abstract class AbstractContainer { ... @OneToMany(fetch ... ObjectDB tries to serialize the collection using ordinary Java serialization ignoring the @OneToMany
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

Apparent Lazy Loading issues.

only at the database id. Second issue. The docs at: http://www.objectdb.com/api/java/jpa/OneToMany ... apply to the map value." This appears to mean that if I have cascade=CascadeType.ALL on a OneToMany map
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