From 97c7a181935eafd4b37bbf157333c765544a0e32 Mon Sep 17 00:00:00 2001 From: Brett Meyer Date: Mon, 9 Dec 2013 18:10:26 -0500 Subject: [PATCH] HHH-3604 add MySQL engine to table generators Conflicts: hibernate-core/src/main/java/org/hibernate/id/enhanced/TableGenerator.java --- .../java/org/hibernate/id/MultipleHiLoPerTableGenerator.java | 3 ++- .../src/main/java/org/hibernate/id/TableGenerator.java | 3 ++- .../main/java/org/hibernate/id/enhanced/TableGenerator.java | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/id/MultipleHiLoPerTableGenerator.java b/hibernate-core/src/main/java/org/hibernate/id/MultipleHiLoPerTableGenerator.java index bedc828352..bcfbba0c29 100644 --- a/hibernate-core/src/main/java/org/hibernate/id/MultipleHiLoPerTableGenerator.java +++ b/hibernate-core/src/main/java/org/hibernate/id/MultipleHiLoPerTableGenerator.java @@ -129,7 +129,8 @@ public class MultipleHiLoPerTableGenerator implements PersistentIdentifierGenera .append( valueColumnName ) .append( ' ' ) .append( dialect.getTypeName( Types.INTEGER ) ) - .append( " ) " ) + .append( " )" ) + .append( dialect.getTableTypeString() ) .toString() }; } diff --git a/hibernate-core/src/main/java/org/hibernate/id/TableGenerator.java b/hibernate-core/src/main/java/org/hibernate/id/TableGenerator.java index b4abd52900..a002413c70 100644 --- a/hibernate-core/src/main/java/org/hibernate/id/TableGenerator.java +++ b/hibernate-core/src/main/java/org/hibernate/id/TableGenerator.java @@ -239,7 +239,8 @@ public class TableGenerator implements PersistentIdentifierGenerator, Configurab public String[] sqlCreateStrings(Dialect dialect) throws HibernateException { return new String[] { - dialect.getCreateTableString() + " " + tableName + " ( " + columnName + " " + dialect.getTypeName(Types.INTEGER) + " )", + dialect.getCreateTableString() + " " + tableName + " ( " + + columnName + " " + dialect.getTypeName(Types.INTEGER) + " )" + dialect.getTableTypeString(), "insert into " + tableName + " values ( 0 )" }; } diff --git a/hibernate-core/src/main/java/org/hibernate/id/enhanced/TableGenerator.java b/hibernate-core/src/main/java/org/hibernate/id/enhanced/TableGenerator.java index 36ad1a3e50..c50a4ab2eb 100644 --- a/hibernate-core/src/main/java/org/hibernate/id/enhanced/TableGenerator.java +++ b/hibernate-core/src/main/java/org/hibernate/id/enhanced/TableGenerator.java @@ -602,7 +602,8 @@ public class TableGenerator implements PersistentIdentifierGenerator, Configurab .append( dialect.getTypeName( Types.BIGINT ) ) .append( ", primary key ( " ) .append( segmentColumnName ) - .append( " ) ) " ) + .append( " ) )" ) + .append( dialect.getCreateTableString() ) .toString() }; }