RawSushi's Tech Journal
My online tech scrapbook where I keep my notes in case I need to look them up later
Monday, July 2, 2012
Hibernate: Composite Primary Key Mapping
Here's how to do it:
<composite-id name="id" class="com.xxx.xxx.xxx.KeyClass">
<key-property name="keyProp1" column="key1" />
<key-property name="keyProp2" column="key2" />
</composite-id>
Use this in place of the usual "id" tag.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment