Committed the test case from HHH-5421 (org.hibernate.jpa.test.collection.PostLoadTest).
The issue appears to be caused by org.hibernate.loader.Loader#initializeEntitiesAndCollections. The call to TwoPhaseLoad#initializeEntity kicks off the PostLoad. If the collection is a Set (as in the test case), endCollectionLoad is called afterwards. In order for PostLoad to work, endCollectionLoad needs to execute first – it adds the collection to the persistence context. If the collection is an Array, endCollectionLoad is first and the test passes.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Committed the test case from
HHH-5421(org.hibernate.jpa.test.collection.PostLoadTest).The issue appears to be caused by org.hibernate.loader.Loader#initializeEntitiesAndCollections. The call to TwoPhaseLoad#initializeEntity kicks off the PostLoad. If the collection is a Set (as in the test case), endCollectionLoad is called afterwards. In order for PostLoad to work, endCollectionLoad needs to execute first – it adds the collection to the persistence context. If the collection is an Array, endCollectionLoad is first and the test passes.