I am having trouble with a parent-child relationship. Specifically dealing with children not being deleted from the DB when they are removed from the parent's collection. The mappings shown below work when I delete the parent (ie. the children are deleted from the DB as well), but on an update, the removed child is never deleted from the DB.
Hibernate version:
3.0.5
Mapping documents:
Code:
<class name="DataflowDefinition"
table="dataflow_definition"
dynamic-update="true"
dynamic-insert="false">
<id name="id" column="dataflow_definition_id" access="field">
<generator class="assigned"/>
</id>
...
<set name="channels" access="field" cascade="all-delete-orphan">
<key column="dataflow_definition_id" not-null="true"/>
<one-to-many class="ChannelDefinition"/>
</set>
</class>
<class name="ChannelDefinition"
table="channel_definition"
dynamic-update="true"
dynamic-insert="false">
<id name="id" column="channel_definition_id" access="field">
<generator class="assigned"/>
</id>
</class>
Name and version of the database you are using:
HSQLDB v1.7.2