Beginner |
|
Joined: Sat Jun 24, 2006 7:05 am Posts: 20
|
I need to build a JPA/Hibernate application on a database wich can be modified from outside my application. I execute a query and show my data to users but, in mean time, data can change but when I execute the query again I see old version of data and not the new one. I believe this is a behaviour coming from L1 cache. Is there any way to instruct hibernate to reread data from DB for a given query or for every query bypassing L1 cache ? I know there's a refresh method in EntityManager but it refreshes only one entity doing a query in the DB : this is dramatic for performances . Clearing the cache before any query is not viable in my environment because of errors coming from detaching entities. Tks for all suggestion. Tks
|
|