-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Query cache bug
PostPosted: Thu Oct 06, 2005 4:11 pm 
Regular
Regular

Joined: Thu Dec 02, 2004 10:42 am
Posts: 54
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?


Top
 Profile  
 
 Post subject: Re: Query cache bug
PostPosted: Sat Oct 08, 2005 1:00 am 
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.


Top
  
 
 Post subject:
PostPosted: Sat Oct 08, 2005 4:56 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
I can't see the patch in the mailing list, could you please create a JIRA issue and attach the patch there so I could apply it to the CVS version?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 09, 2005 3:39 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Matt, I found your patch, but it doesn't seem relevant to this issue... orientphoebus, please file a bug report with a test case, I'll have a look at it.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.