Hi: Gurus I am having the org.hibernate.LazyInitializationException when I am trying to use the setFetchMode in my criteria query for the graph of objects. I am using Hibernate 3.3.2 with JDK 1.6. Here is my graph of objects and the pseudo code:
class A { Set<B> b; Set <C> c; }
Class C { set<D> d; }
createCriteria(A.class); crit.setFetchMode("b", FetchMode.JOIN); crit.setFetchMode("c", FetchMode.JOIN); crit.createCriteria("c").setFetchMode("d", FetchMode.JOIN);
I can successfully load the graph of objects b and c for Object a, but I can not load the graphs of object d for object c and get the LazyInitializationException .
Can some one shed some light what am I doing wrong in my code above.
Regards, RJ.
|