views:

46

answers:

2

Following problem:

I create a Query to display all Entries of a MYSQL Table, if I edit a Field and execute the Query again I get the same (old) Result as in the first query.

It seems that Hibernate caches the Result. I tried to disable Caching with

query.setCachable(false)

"hibernate.cache.use_second_level_cache"

"cache.provider_class"

"org.hibernate.cacheable"

flushing and closing the session

but nothing works

+2  A: 

I think the configuration you want is

hibernate.cache.use_query_cache = false

Reference.

matt b
doesn't work...
Patrick
this then implies that the query cache is not your problem at all
matt b
+2  A: 

Could it be that you never saved or updated the the changed entry to hibernate? When the cache returns the wrong result that is usually an indication something else is wrong.

Peter Tillemans
I changed the field in the Table manually and i committed it too
Patrick
Can you update your question with the code, or at least the fragments relating to editing and updating the entry?
Peter Tillemans