diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/HSQLDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/HSQLDialect.java index 3f879fb363..2f50f88d90 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/HSQLDialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/HSQLDialect.java @@ -301,8 +301,16 @@ public class HSQLDialect extends Dialect { }; } + // Note : HSQLDB actually supports [IF EXISTS] before AND after the + // But as CASCADE has to be AFTER IF EXISTS in case it's after the tablename, + // We put the IF EXISTS before the tablename to be able to add CASCADE after. @Override public boolean supportsIfExistsAfterTableName() { + return false; + } + + @Override + public boolean supportsIfExistsBeforeTableName() { return true; } @@ -669,4 +677,15 @@ public class HSQLDialect extends Dialect { public boolean supportsTupleDistinctCounts() { return false; } + + // Do not drop constraints explicitly, just do this by cascading instead. + @Override + public boolean dropConstraints() { + return false; + } + + @Override + public String getCascadeConstraintsString() { + return " CASCADE "; + } }