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

          Georgi Naplatanov created issue -
          Milosz Tylenda made changes -
          Field Original Value New Value
          Link This issue is related to OPENJPA-1047 [ OPENJPA-1047 ]
          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/
          Milosz Tylenda made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 1.3.0 [ 12313326 ]
          Fix Version/s 2.0.0-M4 [ 12314149 ]
          Resolution Fixed [ 1 ]
          Donald Woods made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development