orientphoebus wrote:
I heard Hibernate 2.x later version solved this? not sure.
The issue is, when using query cahe with a query using parameter ("select from User u where u.Name= :paramName").
when the parameter got changed, the query cahce won't go to fetch new data from DB, but return the previous cached result with old parameter.
My friend still in Java job told me it's a known bug in earlier 2.x version, shall be solved in later 2.x. Is it difficult to find out and porting over to NHibernate?
For now, I can only use SetCacheRegion() every time, and using the Parameter as the cacheRegion name. Will this cost too much memory? If cache expired, will these Region got deleted?
Check out my patch on the developer's mailing list. I just encounted the bug and the patch fixes it for me.