From 94b841b9117c30394f07979ed8d04ad15729562c Mon Sep 17 00:00:00 2001 From: Zed Date: Mon, 9 Mar 2020 15:50:58 +0800 Subject: [PATCH] =?UTF-8?q?DEC-12348=20=E5=A4=96=E7=BD=AE=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93=E5=AF=BC=E5=85=A5=E6=95=B0=E6=8D=AE=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/third/org/hibernate/dialect/DB2Dialect.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fine-hibernate/src/com/fr/third/org/hibernate/dialect/DB2Dialect.java b/fine-hibernate/src/com/fr/third/org/hibernate/dialect/DB2Dialect.java index 5f5fc4476..7c3433709 100644 --- a/fine-hibernate/src/com/fr/third/org/hibernate/dialect/DB2Dialect.java +++ b/fine-hibernate/src/com/fr/third/org/hibernate/dialect/DB2Dialect.java @@ -93,6 +93,8 @@ public class DB2Dialect extends Dialect { registerColumnType( Types.INTEGER, "integer" ); registerColumnType( Types.CHAR, "char(1)" ); registerColumnType( Types.VARCHAR, "varchar($l)" ); + // DEC-12348 db2数据库9.7版本不会自动将nvarchar转varchar,需要在方言内处理 + registerColumnType( Types.NVARCHAR, "varchar($l)" ); registerColumnType( Types.FLOAT, "float" ); registerColumnType( Types.DOUBLE, "double" ); registerColumnType( Types.DATE, "date" );