Assuming I have an object that maps to Hibernate ( E), and a view that queries the table of the object also displayed with Hibernate ( V).
If I save the instance Eand then query Vin the same session, then hibernate does not clear the persistence queue, because it does not know that these two objects are connected, and therefore, the result of the query Vwill not be correct.
I am currently clearing the session manually, but I find this an unsatisfactory solution, as it involves too much knowledge about how the mappings are performed.
What other options are there to validate view queries?
source
share