OpenJPA
  1. OpenJPA
  2. OPENJPA-709

Better naming for unique constraints

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.3.0, 2.0.0-beta
    • Component/s: None
    • Labels:
      None
    • Environment:
      SUN JDK 1.6.0_06 for Linux(amd64)

      Description

      An unique constraint name contains "uk_" prefix and combination of field's names. In case two or more tables have unique constraints with the same combination of fields, the generation of database's schema will fail, because constraint name should be unique too.

      It will be very nice if next versions of JPA specification will include possibility to set name for particular constraint.

        Issue Links

          Activity

          Hide
          Milosz Tylenda added a comment -

          I believe this has been fixed some time ago in the trunk and 1.3.x branch.

          A test case can be seen here:
          http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/unique/

          Show
          Milosz Tylenda added a comment - I believe this has been fixed some time ago in the trunk and 1.3.x branch. A test case can be seen here: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/unique/

            People

            • Assignee:
              Unassigned
              Reporter:
              Georgi Naplatanov
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development