I have domain object "Parent". It has propery - a collection of objects "Child"
here is piece of parent.hbm.xml
Code:
<set name="Children" lazy="true" access="field.camelcase" inverse="true" cascade="delete" batch-size="10" >
<key column="[parent_id]" foreign-key="[FK_Children]" />
<one-to-many class="ParentChild" />
</set>
There is also table "ParentChild" which has two columns <parent_id><child_id> where listed children of each parent
Problem is - when i delete parents, their children also deleted,
but records from "ParentChild" (acording to deleted parent) remains unmodified
how can solve this problem?