Hi Sukirtha,
the sets that i have are cascasde="all-delete-orphan"
here are the mappings of the top most entity:
fpr simplicity i took out the primitive properties. left the entity TuitSchoolCalTerm (which in turns calls other entites) and one of the sets
Code:
<hibernate-mapping>
<class name="TuitReq" discriminator-value="0" table="TUIT_REQ">
<id name="id" type="java.lang.Long">
<column name="ID" scale="0" />
<generator class="native" />
</id>
<discriminator column="TUIT_REQ_TYPE" type="java.lang.Integer"/>
<property name="tuitSchoolCalTerm" type="TuitSchoolCalTerm">
<column name="SCHOOL_CAL_TERM" scale="0" not-null="true" />
</property>
<property name="empId" type="java.lang.Long">
<column name="EMP_ID" scale="0" not-null="true" />
</property>
.... more properties....
<subclass name="TuitReqEmp" discriminator-value="1">
.... more properties....
<set name="tuitCareerRels" inverse="true" cascade="all-delete-orphan" outer-join="true" lazy="true">
<key>
<column name="REQ_ID"/>
</key>
<one-to-many class="TuitCareerRel" />
</set>
</subclass>
<subclass name="TuitReqDep" discriminator-value="2">
.... more properties....
</subclass>
</class>
</hibernate-mapping>