OneToMany « Load « JPA Q&A

1. EclipseLink: onetomany relationships with lazy loading loaded with serialization

I'm facing a problem with eclipselink under websphere 7.0 in a clustered environment. When my entity is serialized every 1-n relationship lazy is loaded, even if the entity is detached. How ...

2. Eager loading OneToMany in Hibernate with JPA2

I have a simple @OneToMany between Person and Pet entities:

@OneToMany(mappedBy="owner", cascade=CascadeType.ALL, fetch=FetchType.EAGER)
public Set<Pet> getPets() { return pets; }
I would like to load all Persons with associated Pets. So I came up ...

3. Hibernate inverse=''true" and problems when getting one-to-many

I am trying to use the following mapping :

<class name="Category" table="CATEGORY" lazy="false">
    <id name="id" type="java.lang.Long" >
        <column name="ID" />

4.  doesn't load latest updates of a OneToMany List

I'm using the <s:action> tag of struts for load a list of elements belonging to another object ( a @OneToMany relationship ) from database using JPA API. The problem is that when ...

5. Too many instances when loading @OneToMany

hello, I have a small Swing app using hibernate with a standalone HSQLDB backend. There is a Project class (Singleton because there is one HSQLDB per Project) which contains SequenceLists objects which contains GibbsSamplingResults objects (the inheritance is currently not used): Code: @Entity @Inheritance(strategy=InheritanceType.SINGLE_TABLE) @DiscriminatorValue(value="Project") @Table(name="projects") public class Project { @Id private final Long id ...

6. Null pointer E while loading Object having OnetoMany Relatio

Hi, I am getting NullpointerException while creating getProxyFactory(..) when trying to load the Object using Session.get( A.class, aId) under user Transaction I have created in my java main() program; same thing works when I deploy on the webloigc application server and use under ejb transaction. here A has Many-To-One relationship with Class B, and in the query I see it is ...