plasmafire wrote:
cascade deletes. Does your code look like this?
Code:
<set name="children" inverse="true" cascade="all">
<key name="PARENT_ID" on-delete="cascade"/>
<one-to-many class="Child"/>
</set>
Just check if the elements are getting instantiated before deletion, in that case..you are doing something wrong.
my mapping looks like
Code:
<parentclass testRun>
<list name="testResults" lazy="true" inverse="false" cascade="persist,evict,delete,replicate,lock,save-update">
<key column="testrun_id">
</key>
<index column="sequence"/>
<one-to-many
class="com.seqis.kltm.model.db.project.TestResult"
/>
</list>
</parentclass>
<childclass TestResult>
<many-to-one
name="testRun"
class="com.seqis.kltm.model.db.project.TestRun"
cascade="none"
update="false"
insert="false"
column="testrun_id"
lazy="false"
/>
</childclass>
i will look, if the elemets get instantiated before deletion.