| After further research, it looks like the Hibernate behavior in this case is indeed wrong according to the JSR-338 specification, which states:
3.5.3 Semantics of the Life Cycle Callback Methods for Entities [...] The PostLoad method for an entity is invoked after the entity has been loaded into the current persistence context from the database or after the refresh operation has been applied to it.
and
3.2.9 Load State An entity is considered to be loaded if all attributes with FetchType.EAGER —whether explictly specified or by default— (including relationship and other collection-valued attributes) have been loaded from the database or assigned by the application. Attributes with FetchType.LAZY may or may not have been loaded.
|