The Answer to Life, the Universe, and Everything

Sunday, November 12, 2006

Hibernate - Composite key

For a table with a composite key, you may map multiple properties of the class as identifier properties. The <composite-id>element accepts <key-property> property mappings and <key-many-to-one> mappings as child elements.

<composite-id>
<key-property name="medicareNumber"/>
<key-property name="dependent"/>
</composite-id>

No comments: