-->
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.  [ 2 posts ] 
Author Message
 Post subject: Caching collections problem...
PostPosted: Wed Aug 30, 2006 4:15 pm 
Newbie

Joined: Thu Jan 20, 2005 12:21 pm
Posts: 9
Hi,


I have a bidirectional many to one relation from A to B. In the mapping I use a bag for the B side of the association mapped with lazy="false" and inverse="true". Inside the bag mapping I have a <cache usage="read-write"/> to enable caching of the collection:

Now, when I retrieve the B side of the association from the database (cache miss) everything is ok and B's collection of A's is initialized successfully. When I do it a second time, and get a cache hit, the collection is empty.

Any ideas what this could be? Are there any specific additional rules that come into play when caching is enabled?

Cheers
Erik


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 12, 2007 4:24 pm 
Regular
Regular

Joined: Fri Dec 17, 2004 10:38 am
Posts: 54
do you mean - no collection from cache, or no collection from cache AND db?
If you got cache hit, and latter see db hit getting collection values by "in (...)" query you probably miss cache directive for you domain objects (e.g A and B)


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