This issue occurs when using a read-write cache concurrency strategy, and applying an update or delete as part of an HQL or native sql query. The L2 entity cache gets cleared before the transaction is committed. This can lead to scenarios where a different session is able to populate the cache with the old data, leaving the cache out-of-date. |