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

Configuration#generateSchemaUpdateScript does not create unique constraints

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3.0.Beta1, 4.2.1
    • 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

      HHH-7797 forced all unique constraints to be created in "alter table" statements. This is not wired into Configuration#generateSchemaUpdateScript as it is in generateSchemaCreationScript. See comments on HHH-7797

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              nbpratt@gmail.com Nick Pratt added a comment -

              I just picked this change up in the latest snapshot build. While the generateSchemaUpdateScript is now detecting the missing constraints, it also seems to be detecting some existing constraints as missing. When you run Hibernate in update mode against HSQLDB, when Hibernate tries to apply the "missing" constraints, HSQLDB throws an exception stating that the constraint already exists. It seems to be predominantly Unique constraints on single columns.

              Show
              nbpratt@gmail.com Nick Pratt added a comment - I just picked this change up in the latest snapshot build. While the generateSchemaUpdateScript is now detecting the missing constraints, it also seems to be detecting some existing constraints as missing. When you run Hibernate in update mode against HSQLDB, when Hibernate tries to apply the "missing" constraints, HSQLDB throws an exception stating that the constraint already exists. It seems to be predominantly Unique constraints on single columns.
              Hide
              brmeyer Brett Meyer added a comment -

              Nick Pratt, I'm following up with HHH-8162

              Show
              brmeyer Brett Meyer added a comment - Nick Pratt , I'm following up with HHH-8162
              Show
              brmeyer Brett Meyer added a comment - https://bugzilla.redhat.com/show_bug.cgi?id=979098 https://bugzilla.redhat.com/show_bug.cgi?id=979103

                People

                • Votes:
                  1 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Development