Skip to content

Commit 8f08bda

Browse files
committed
Use Dialect.getCreateTableString() to avoid HANA failure
1 parent af6ca24 commit 8f08bda

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

hibernate-core/src/test/java/org/hibernate/orm/test/schemaupdate/checkconstraint/table/TableCheckConstraintTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import org.hibernate.boot.registry.StandardServiceRegistry;
1515
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
1616
import org.hibernate.boot.spi.MetadataImplementor;
17+
import org.hibernate.testing.orm.junit.DialectContext;
1718
import org.hibernate.tool.hbm2ddl.SchemaExport;
1819
import org.hibernate.tool.schema.TargetType;
1920

@@ -175,9 +176,10 @@ private static boolean tableCreationStatementContainsConstraints(
175176
String[] fileContent,
176177
String tableName,
177178
String secondaryTableConstraints) {
179+
final String createTableString = DialectContext.getDialect().getCreateTableString().toUpperCase( Locale.ROOT );
178180
for ( String string : fileContent ) {
179181
String statement = string.toUpperCase( Locale.ROOT );
180-
if ( statement.contains( "CREATE TABLE " + tableName.toUpperCase( Locale.ROOT ) ) ) {
182+
if ( statement.contains( createTableString + " " + tableName.toUpperCase( Locale.ROOT ) ) ) {
181183
if ( statement.contains( secondaryTableConstraints.toUpperCase( Locale.ROOT ) ) ) {
182184
return true;
183185
}

0 commit comments

Comments
 (0)