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