hibernate-orm icon indicating copy to clipboard operation
hibernate-orm copied to clipboard

HHH-14983: clear second-level cache before executing an HQL update

Open nikolabekcic opened this issue 2 years ago • 1 comments

… to prevent loading stale cache entries (in the same session) upon executing the HQL update query. Changed AbstractReadWriteAccess by removing the no-op removeAll method so that "affected cache regions" can be cleared before executing an HQL, ensuring strong data consistency.

Merged provided test case into existing ReadWriteCacheTest. Performed code polish by moving book creation and saving into a @Before method as it's needed by all tests. Renamed helper test methods to reveal intention in a better way.

nikolabekcic avatar Dec 17 '21 16:12 nikolabekcic

Thanks for your pull request!

This pull request appears to follow the contribution rules.

› This message was automatically generated.