When FetchType.EAGER is specified to retrieve embedded objects, it seems to be treated as LAZY. In other words, initial retrieval of the object does retrieve the embedded objects, it’s only when you try to read the embedded attribute, getXYZ(), it goes back to Hibernate and to retrieve it because it is behaving in a LAZY manner. It seems to happen only when query.scroll() is used and not when session.get() is used. Version 5.3.10 works. Later versions of 5.3.x seem to work differently. 5.6 seems to have the issue. Expectation: When FetchType.EAGER is specified, it should retrieve the object and its embedded objects. What happens: Only non-embedded attributes are retrieved and embedded objects are lazily initialized. Please see attached test. |