-->
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.  [ 1 post ] 
Author Message
 Post subject: Newbie Question : Second Level Cache and One-To-One Associat
PostPosted: Wed Oct 26, 2005 7:23 am 
Newbie

Joined: Wed Oct 26, 2005 7:12 am
Posts: 1
Hi,

I am trying to get the second level cache working for the following class on Hibernate v2.18. If I remove the one-to-one relationship I can see that the second level cache works correctly but if the one-to-one relationship is added it retrieves the objects on every call.

Can anybody shed some light on this?

Regards

David Snowsill

Hibernate version:
v2.18

Mapping documents:

<class name="au.com.calibreFT.marketObservations.PhenomenonTypeData" table="T_PHENOMENON_TYPES">
<cache usage="read-write" />
<id name="id" column="PHENOMENON_TYPE_ID" type="int" unsaved-value="0">
<generator class="identity"/>
</id>

<property name="name" column="UNIQUE_NAME"/>

<many-to-one name="defaultDistributor" column="DEFAULT_DISTRIBUTOR_ID" />

<one-to-one name="calculationScript" class="au.com.calibreFT.calcScript.CalculationScript" cascade="delete" />

</class>

<!-- Mapping for Calculation Script -->
<class name="au.com.calibreFT.calcScript.CalculationScript" table="T_CALCULATION_SCRIPTS" >
<cache usage="read-write"/>
<id name="id" column="PHENOMENON_TYPE_ID" type="int" unsaved-value="0">
<generator class="foreign">
<param name="property">parent</param>
</generator>
</id>

<property name="languageId" column="LANGUAGE_ID" />
<property name="scriptText" column="SCRIPT_TEXT" />

<one-to-one name="parent" constrained="true" />

</class>


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

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.