|
I hit the problem http://raffaelschmid.wordpress.com/2013/05/23/native-sql-queries-and-the-hibernate-cache/
Checking with the JavaDoc http://docs.jboss.org/hibernate/orm/4.3/javadocs/org/hibernate/SynchronizeableQuery.html#addSynchronizedEntityClass%28java.lang.Class%29 "Adds an entity for ... query result cache invalidation" If this method is never called, one would expect there is not any cache invalidation.
I suspect there is a bug at https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/action/internal/BulkOperationCleanupAction.java#L164 The if-statement contradicts with comment "@return True if there are affected table spaces and ...".
|