On Feb 3, 11:42 pm, YingGuo <[email protected]> wrote:
> Parent class has composite key
>
> (key1,key2,fieldx,fieldy...)
>
> child class has composite key
> (key1,key2,key3,fielda,....)
You didn't post a lot of detail, but here's a stab in the dark...
<class name="Parent" ... >
<composite-id>
<key property="key1" ... />
<key property="key2" ... />
</composite-id>
<set name="Child" class="Child">
<key>
<!-- following columns are on the child class -->
<column name="key1" />
<column name="key2" />
</key>
</set>
</class>
<class name="Child" ... >
<composite-id>
<key property="key1" ... />
<key property="key2" ... />
<key property="key3" ... />
</composite-id>
<many-to-one name="Parent" class="Parent">
<key property="key1" ... />
<key property="key2" ... />
</many-to-one>
</class>
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.