[hibernate-dev] unique-key attribute for many-to-one elements
Michael Foltz
foltz at lxis.net
Fri Feb 23 08:26:44 EST 2007
hey,
I'd like to setup a multi-column unique constraint, which i'd normally be
able to do with the unique-key attribute in a column element:
<property name="FirstName">
<column name="FirstName" unique-key="PersonFirstLastName"/>
</property>
<property name="LastName" >
<column name="LastName" unique-key="PersonFirstLastName"/>
</property>
but if I want to have a many-to-one element, unique-key is not listed as one
of the available attributes.
<property name="IsLeadDeveloper">
<column name="IsLeadDeveloper" unique-key="GroupLeadDeveloper"/>
</property>
<property name="Group" >
<many-to-one name="GroupID" unique-key="GroupLeadDeveloper"/>
</property>
I'm working with CastleProject/ActiveRecord, and submitted a JIRA issue to
the project, but they suggested that Hibernate does not support this and
that I should post a JIRA issue here. Just want to verify that I'm not
taking the wrong approach before I post it to JIRA.
thx,
foltz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-dev/attachments/20070223/58ab2b6d/attachment.html
More information about the hibernate-dev
mailing list