Hibernate version: 3.2.0 GA
Hi, I am wondering what would be the best way to eagerly load an object with all its associations using Hibernate with JPA. By default the fetch strategy is lazy. However sometimes the whole object graph has to be fetched eagerly. Please consider the following code snippet:
Code:
class A {
List movies;
D statistic; // FetchType.LAZY
}
class B {
List images;
}
class D {
List recentStatistics;
}
class C {
A movieHolder; // FetchType.LAZY
B imageHolder; // FetchType.LAZY
}
What is the best method to retrieve object C fully initialized with all its associations using the Hibernate EntityManager?
Thx for your help!
Squabi