HHH-3604 add MySQL engine to table generators
This commit is contained in:
parent
1811b48f72
commit
e1366904fa
|
@ -129,7 +129,8 @@ public class MultipleHiLoPerTableGenerator implements PersistentIdentifierGenera
|
||||||
.append( valueColumnName )
|
.append( valueColumnName )
|
||||||
.append( ' ' )
|
.append( ' ' )
|
||||||
.append( dialect.getTypeName( Types.INTEGER ) )
|
.append( dialect.getTypeName( Types.INTEGER ) )
|
||||||
.append( " ) " )
|
.append( " )" )
|
||||||
|
.append( dialect.getTableTypeString() )
|
||||||
.toString()
|
.toString()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -239,7 +239,8 @@ public class TableGenerator implements PersistentIdentifierGenerator, Configurab
|
||||||
|
|
||||||
public String[] sqlCreateStrings(Dialect dialect) throws HibernateException {
|
public String[] sqlCreateStrings(Dialect dialect) throws HibernateException {
|
||||||
return new String[] {
|
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 )"
|
"insert into " + tableName + " values ( 0 )"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -657,7 +657,7 @@ public class TableGenerator implements PersistentIdentifierGenerator, Configurab
|
||||||
dialect.getCreateTableString() + ' ' + tableName + " ( "
|
dialect.getCreateTableString() + ' ' + tableName + " ( "
|
||||||
+ segmentColumnName + ' ' + dialect.getTypeName( Types.VARCHAR, segmentValueLength, 0, 0 ) + " not null "
|
+ segmentColumnName + ' ' + dialect.getTypeName( Types.VARCHAR, segmentValueLength, 0, 0 ) + " not null "
|
||||||
+ ", " + valueColumnName + ' ' + dialect.getTypeName( Types.BIGINT )
|
+ ", " + valueColumnName + ' ' + dialect.getTypeName( Types.BIGINT )
|
||||||
+ ", primary key ( " + segmentColumnName + " ) ) "
|
+ ", primary key ( " + segmentColumnName + " ) )" + dialect.getTableTypeString()
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue