| This is specifically a problem:
- enhancement as proxy is enabled (hibernate.bytecode.allow_enhancement_as_proxy=true);
- a stateless session is used;
- results from a query involving an entity with a join fetched collection (that is normally lazy) is scrolled.
- join fetched collection has a to-one association with an entity that is an inheritance hierarchy.
The join fetched collection is not initialized, and Hibernate executes an extra query to initialize the to-one association with an entity in a collection element. |