mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-08 20:24:46 +00:00
- changed EntityReadWriteAccess to remove the no-op unlockRegion method (now uses the method inherited from AbstractCachedDomainDataAccess, which calls evictAll) - changed AbstractReadWriteAccess to add a no-op removeAll method (as this is called by the constructor in BulkOperationCleanupAction.EntityCleanup, during the transaction) - added new file ReadWriteCacheTest with some test scenarios: - testDeleteHQL/testDeleteNativeQuery/testUpdateHQL/testUpdateNativeQuery which confirm that the fix corrects the scenario where stale entities could be loaded into the cache and remain there (because the eviction was happening before the transaction had committed) - testDelete/testUpdate show that entity updates/deletions were not affected by this issue (only HQL/native queries)