Hibernate version:2.1.7
I have been reading Hibernate in Action also have resarched this forum for some examples of one-to-many. My problem is that on my many side I have a composite key. Here is an example.
This is the many side
Code:
...
<composite-id name="heligpKey">
<key-property name="subscriberNo" column="SUBNO"/>
<key-property name="personNo" column="PERNO"/>
<key-property name="eligStartDate" column="ESTDT" type="java.lang.Integer"/>
<key-property name="eligEndDate" column="EENDT" type="java.lang.Integer"/>
</composite-id>
On my one side I also have composite key..
Code:
<composite-id name="hmembpKey">
<key-property name="subscriberNo" column="SUBNO"/>
<key-property name="personNo" column="PERNO"/>
</composite-id>
What is the best approach to mapping this type of relationship? is a one-to-many the best way, parent-child, set....?? Is there an example?
Thanks