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

SchemaExport ERROR when using in-memory database (H2) - drop constraint issue HHH000389

    Details

    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Last commented by a user?:
      true
    • Sprint:

      Description

      HHH-389 Closed resolved an issue with property name="hibernate.hbm2ddl.auto" value="create". It now performs a drop prior to create. When using an in-memory database this will throw errors on table with foreign key constraints.

      ERROR (SchemaExport:426) - HHH000389: Unsuccessful: alter table security_key drop constraint FK3031A4E0BE21E8D7
      ERROR (SchemaExport:427) - Table "SECURITY_KEY" not found; SQL statement:alter table security_key drop constraint FK3031A4E0BE21E8D7

      I noticed that the sqlDropString for org.hibernate.mapping.Table appends "if exists". This is missing for org.hibernate.mapping.ForeignKey.

        Attachments

          Issue links

            Activity

              People

              • Votes:
                16 Vote for this issue
                Watchers:
                20 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: