In my bean class, I have 3 collections, a, b & c, that are set to non-lazy initialization. When I use
Code:
criteria.setFetchMode("a", FetchMode.EAGER)
for either a, b
or c only, everything works fine. However, if I try to lazily initialize all 3, ie,
Code:
criteria.setFetchMode("a", FetchMode.EAGER).setFetchMode("b", FetchMode.EAGER).setFetchMode("c", FetchMode.EAGER)
, only 1 of the collections would be initialized and I would get a LazyInitializationException if I tried to access the other 2 collections. I speculate that the property that appears first in my mapping file is the one that gets successfully initialized. I am using version 2.1.8 of hibernate. My db is oracle 9i and i specified Oracle9Dialect as the dialect.