Announcement Announcement Module
Collapse
No announcement yet.
Composite unique index with JPA Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    I've solved.

    Just adding this annotation!

    @Table(uniqueConstraints=@UniqueConstraint(columnN ames={"lastName","firstName"}), name="myUniqueConstraint")

    Thank you anyway

    Comment

    Working...
    X