This seems to affect all 5.3.x as well as 5.4.0. The first issue described below does seem to be fixed in 5.4.1. The second issue still exists in all versions tested (5.2.18, 5.3.7, and 5.4.1).
When batch fetching is enabled in 5.3.7, there are two issues found:
# A simple read (em.find(...)) against an entity with an eager list many-to-one mapping will result in duplicate children objects being added to the collection. ** See attached test HibernateTests.testManyToOneEagerMapping ** *PASSES* in 5.2.18 and 5.4.1. *FAILS* in 5.3.7 and 5.4.0. # Refreshing the locked entity may still not return the lock mode the entity was locked at. This relates to HHH-12257 which was marked as resolved for 5.3.0. One of the tests in the test project attached that illustrates HHH-12257 is now passing here; however, the other one still fails. ** See attached test HibernateTests.testLazyCollectionAfterBatchFetchRefreshLock) ** *FAILS* in all versions tested. ** Note that even if the test is resolved, HHH-12268 will still cause this test to fail due to the exception thrown by delazifying the children; I'm aware that issue is still open.
I have attached the test project that illustrates the above issues. You can also find it on github at https://github.com/caspianb/HibernateRefreshTest [^HibernateRefreshTest.zip] |
|