Using 2.1 beta 4
Hi all, I have a system with three classes: Communications, Segments and SegmentResults. Each Communication has a list of Segments and eache Segment has a list of SegmentResults. Both Segments and SegmentResults have references back to their "owing objects" (mapping file follows)
When I load a Communication e.g
Code:
Communication c = (Communication)sess.load(Communication.class,"BBBBJ3R3BBBN");
everything works as I want it too.
But if I load a Segment e.g.
Code:
Segment c = (Segment)sess.load(Segment.class,"BBBBJ3R4BBJR");
The system appears to go into an infinite loop loading the segment over and over.
Any ideas what might be causing this?
Thanks, Marc
Code:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
<hibernate-mapping>
<class name="com.teradata.crm.tracer.examples.Folder.entity.Communication" table="IOS_ECAMP">
<id name="ecampId" type="java.lang.String">
<column name="ECAMP_ID" length="12"/>
<generator class="com.teradata.crm.tracer.examples.Folder.entity.IdGenerator.KhariGenerator"/>
</id>
<set name="segmentsHibernate" table="IOS_ECAMP_X_SEG" inverse="true" lazy="false" outer-join="true" cascade="save-update">
<key column="ECAMP_ID"/>
<one-to-many class="com.teradata.crm.tracer.examples.Folder.entity.Segment"/>
</set>
<!-- other properties -->
</class>
<class name="com.teradata.crm.tracer.examples.Folder.entity.SegmentResult" table="IOS_ECAMP_SEG_RES">
<composite-id name="objectId" class="com.teradata.crm.tracer.examples.Folder.entity.PK.SegResPk">
<key-many-to-one name="segment" class="com.teradata.crm.tracer.examples.Folder.entity.Segment" column="SEG_ID"/>
<key-property name="custLevelCode" column="CUST_LEV_CD" type="java.lang.String"/>
</composite-id>
<!-- other properties -->
</class>
<class name="com.teradata.crm.tracer.examples.Folder.entity.Segment" table="IOS_ECAMP_X_SEG">
<id name="segId" type="java.lang.String">
<column name="SEG_ID" length="12"/>
<generator class="com.teradata.crm.tracer.examples.Folder.entity.IdGenerator.KhariGenerator"/>
</id>
<set name="resultsHibernate" table="IOS_ECAMP_SEG_RES" inverse="true" lazy="false" outer-join="true" cascade="delete">
<key column="SEG_ID"/>
<one-to-many class="com.teradata.crm.tracer.examples.Folder.entity.SegmentResult"/>
</set>
<many-to-one name="communication" column="ECAMP_ID" class="com.teradata.crm.tracer.examples.Folder.entity.Communication" outer-join="true"/>
<!-- other properties -->
</class>
</hibernate-mapping>