|
To elaborate a little my xmlFile looks like this:
<composite-id>
<key-property name="PartsId" column="PartsID" />
<key-property name="TestOrderId" column="TestOrderID" />
</composite-id>
<property column="Author" type="String" name="Author" not-null="true" length="50" />
<property column="EditDate" type="DateTime" name="EditDate" />
<property column="EditAuthor" type="String" name="EditAuthor" length="50" />
If I in another file want to make a one-to-many relation to this xml file, how do I do it?
Usually I would do like this, if there would only be one PK:
<set
name="Parts"
inverse="true"
cascade="all-delete-orphan">
<key column="PartId"/>
<one-to-many class="data.Part, data"/>
</set>
|