With Hibernate 3.1, I defined a property as lazily resolved and performed the requisite instrumentation via the Ant InstrumentTask task. While the lazy resolution behaved correctly for objects that I resolved via Session.get(), it did not behave correctly for objects I resolved via Query.list(); cglib failed with a NullPointerException when the proxy attempted to resolve the lazily-loaded property. On a related note, probably, I noticed that Session.get() returned an instance of the target class that referenced the proxy implementation, while Query.list() returns a proxy implementation proper. Please advise.
Thanks.
|