HHH-10529 - Fix SQLServer2008Dialect generate incorrect length of nvarchar
This commit is contained in:
parent
d4772107f0
commit
409c5424a0
|
@ -18,6 +18,8 @@ import org.hibernate.type.StandardBasicTypes;
|
|||
* @author Gavin King
|
||||
*/
|
||||
public class SQLServer2008Dialect extends SQLServer2005Dialect {
|
||||
|
||||
private static final int NVARCHAR_MAX_LENGTH = 4000;
|
||||
/**
|
||||
* Constructs a SQLServer2008Dialect
|
||||
*/
|
||||
|
@ -25,6 +27,8 @@ public class SQLServer2008Dialect extends SQLServer2005Dialect {
|
|||
registerColumnType( Types.DATE, "date" );
|
||||
registerColumnType( Types.TIME, "time" );
|
||||
registerColumnType( Types.TIMESTAMP, "datetime2" );
|
||||
registerColumnType( Types.NVARCHAR, NVARCHAR_MAX_LENGTH, "nvarchar($l)" );
|
||||
registerColumnType( Types.NVARCHAR, "nvarchar(MAX)" );
|
||||
|
||||
registerFunction(
|
||||
"current_timestamp", new NoArgSQLFunction( "current_timestamp", StandardBasicTypes.TIMESTAMP, false )
|
||||
|
|
Loading…
Reference in New Issue