From 6b8c3024944154e246d040252593b9e3f1fe5776 Mon Sep 17 00:00:00 2001 From: cranforc Date: Wed, 28 Oct 2015 15:01:21 -0500 Subject: [PATCH] HHH-8435 @Lob/@Nationalized results in NCLOB in MSSQL2005 rather than NVARCHAR(MAX) HHH-8435 @Lob/@Nationalized results in NCLOB in MSSQL2005 rather than NVARCHAR(MAX) (cherry picked from commit c65cb7e850801f88f25765fb87356e256999c31c) --- .../main/java/org/hibernate/dialect/SQLServer2005Dialect.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/SQLServer2005Dialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/SQLServer2005Dialect.java index f86b922667..c96a3eac9b 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/SQLServer2005Dialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/SQLServer2005Dialect.java @@ -50,7 +50,9 @@ public class SQLServer2005Dialect extends SQLServerDialect { registerColumnType( Types.BIGINT, "bigint" ); registerColumnType( Types.BIT, "bit" ); - + + // HHH-8435 fix + registerColumnType( Types.NCLOB, "nvarchar(MAX)" ); registerFunction( "row_number", new NoArgSQLFunction( "row_number", StandardBasicTypes.INTEGER, true ) ); }