Lets consider the following scenario. we have a query like this and we are using the query cache for this.
"* from com.xxx.PO where PO.value=10 and PO.xyz=20"
For the first time the query returns 10 rows and hibernate caches the IDs of these 10 rows.
Lets assume that in some other session, the values of some of the rows are changed. So, if the query is run against the DB, the result will be less than 10 rows. But, since hibernate has cached the IDs, for the criteria, it will return all the 10 rows if queried again.
Please clarify.
Regards,
Younus
|