-
Oct 13th, 2010, 07:24 AM
#1
Composite unique index with JPA
Hi everyone.
I've searched a way to define a composite unique index with JPA.. but I find only solutions to create composite primary key.
Does someone have suggestions?
Thank very much!
Marco
-
Oct 13th, 2010, 09:10 AM
#2
I've solved.
Just adding this annotation!
@Table(uniqueConstraints=@UniqueConstraint(columnN ames={"lastName","firstName"}), name="myUniqueConstraint")
Thank you anyway
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules