Uploaded image for project: 'Hibernate ORM'
  1. Hibernate ORM
  2. HHH-3384

uniqueConstraints={@UniqueConstraint does not work inside the @JoinTable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Out of Date
    • Affects Version/s: 3.3.0.CR1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Last commented by a user?:
      true

      Description

      I have a Entity where I am trying to put a Unique constraint on the columns of a Join Table. Eclipse does not compile and gives error: UniqueConstraint cannot resolved to a Type
      Classpath is correctly set because I can use the @UniqueConstraint inside the @Table annotation.

      @ManyToMany(cascade = CascadeType.ALL)
      @JoinTable(name="ENVSLifecycle_NextLifecycle",
      uniqueConstraints={@UniqueConstraint(columnNames=

      {"LIFECYCLE_ID", "NEXTLIFECYCLES_ID"}

      )}
      )
      public Set<Lifecycle> getNextLifecycles()

      { return nextLifecycles; }

        Gliffy Diagrams

          Attachments

            Activity

            There are no comments yet on this issue.

              People

              • Assignee:
                Unassigned
                Reporter:
                shankar.mandal Shankar Mandal
                Participants:
              • Votes:
                2 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Development