I have implemented a generic in my project for queries and using JPA with Hibernate.
In the configuration of persistence is already without using the cache, but it is not working.
For example: there are two systems operating in parallel and they both manipulate a database table, but when I look up a record in one system and this same record was later changed on the other system, when I look at the record again it is not updated, as if it was coming from the cache, however I need the screen to return the record updated in the query.
I’ve already used the entitymanager clear, but this affects other open system windows.
I also used refresh on the object, it even worked, the bad thing is that the query returns a “list” and that forces me to create a “for” to update all the results.
Does anyone have a solution to solve, which was in the query itself, in the “criteria” or “resultlist” in the JPA?