Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-1165

Two unique constraints in a table try to share the same constraint name

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.1, 1.3.0
    • 1.3.0
    • sql
    • None

    Description

      Put two @Column(unique = true) annotations on two different fields in an Entity.

      Set up OpenJPA to synchronize mappings (i.e. generate DDL).

      Observe that when the DDL is created it attempts to create two unique constraints, one for each column. This is good. However, also observe that both unique constraints are named "UNQ_". This causes the H2 database (and probably others) to reject the DDL as invalid (correctly).

      Attachments

        Issue Links

          Activity

            People

              milosz Milosz Tylenda
              ljnelson Laird Nelson
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: