|
I got a test case in my topic branch for this issue https://github.com/barreiro/hibernate-orm/commits/HHH-10055
It's an enhanced version of an existing test ( org.hibernate.test.ondemandload.LazyLoadingTest )
The existing test is not accurate because it neither uses instrumented or enhanced entities, and the lazy behavior is not triggered according to https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/tuple/entity/EntityMetamodel.java#L229
Anyway, the way that it was supposed to work was to have a persistent collection that would do the loading outside of the session if needed. Should that logic be brought to the lazy interceptor ??
|