-->
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.  [ 3 posts ] 
Author Message
 Post subject: How to store nulls ORM in second level cache
PostPosted: Sun Mar 18, 2007 11:21 am 
Newbie

Joined: Sun Mar 18, 2007 11:14 am
Posts: 3
Did anybody tried to store nulls in second level cache?

D.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 21, 2007 10:20 am 
Senior
Senior

Joined: Mon Aug 21, 2006 9:18 am
Posts: 179
Second-level cache doesn't store instances, but values. Do you mean null values?

_________________
If this helped...please remember to rate it!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 21, 2007 3:41 pm 
Newbie

Joined: Sun Mar 18, 2007 11:14 am
Posts: 3
Thanks for reply.
We had problem on read only component.
The problem exists in case that somebody tried to access ORM with null values, in such case Nhibernate tried to fetch data from database and then was flag it for current session for non existents. On second session Nhibernate also try to access it so on every hit on such null value I got hit on database.
I solved this problem with litle change on source SessionImpl for supporting second level cache of null values (ORMs)

I just insert some placeHolder to cache and on second try just fetch and identify that it just placeholder and not cacheedORM.

If somebody interested in same scenario I can post the solution and maybe improve him in such way.

thx


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.