hi..
I have a problem in working with parent/child model.....
when I delete the parent.. Hibernate delete each of its children in separate delete command instead of using WHERE Parent_ID=?
That make the delete process very slow... so How to solve that?
Mapping files look like this
Parent Object:
Code:
<set name="trace" lazy="true" order-by="timeRecieved"
inverse="true" cascade="all-delete-orphan">
<key column="vid" />
<one-to-many
class="ObjectLocation" />
</set>
Child Object:
Code:
<many-to-one name="vehicle" column="vid"
class="Vehicle" not-null="true"
cascade="all" />