-->
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: <many-to-one> caching
PostPosted: Mon Oct 03, 2005 11:22 am 
Hi.

I use 0.99.2.0.

I have two classes Person and PersonType with the following mappings:

Code:
<class name="Person">
        <jcs-cache usage="read-only"/>
         <many-to-one name="..." class="PersonType" not-null="true">         
           ...
        </many-to-one>
</class>

<class name="PersonType">
        <jcs-cache usage="read-only"/>
....
</class>


Every time I load Person instance I see in log that nhibernate loads PersonType from database. Is it normal caching behavior that it caches Person but doesn't cache PersonType?

Thank You.


Top
  
 
 Post subject:
PostPosted: Mon Oct 03, 2005 3:58 pm 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
What happens if you try to load two persons with the same type, does the type get loaded twice then?


Top
 Profile  
 
 Post subject: <many-to-one> caching
PostPosted: Tue Oct 04, 2005 4:59 am 
I'm loading the same person twice(with the same id). It has the same person type :). Person comes from cache and PersonType from DB :(


Top
  
 
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.