From 924770fa0946f46c882f5f4f727c7b77ec0890d6 Mon Sep 17 00:00:00 2001 From: John Verhaeg Date: Fri, 21 Oct 2011 11:00:35 -0500 Subject: [PATCH] HHH-6755: Added BINARY datatype mapping to AbstractTransactSQLDialect (the base class for Sybase and SQL Server dialects) --- .../java/org/hibernate/dialect/AbstractTransactSQLDialect.java | 3 ++- .../main/java/org/hibernate/dialect/SybaseASE15Dialect.java | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/AbstractTransactSQLDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/AbstractTransactSQLDialect.java index 420f93694b..a0e8252cfe 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/AbstractTransactSQLDialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/AbstractTransactSQLDialect.java @@ -46,6 +46,7 @@ import org.hibernate.type.StandardBasicTypes; abstract class AbstractTransactSQLDialect extends Dialect { public AbstractTransactSQLDialect() { super(); + registerColumnType( Types.BINARY, "binary($l)" ); registerColumnType( Types.BIT, "tinyint" ); //Sybase BIT type does not support null values registerColumnType( Types.BIGINT, "numeric(19,0)" ); registerColumnType( Types.SMALLINT, "smallint" ); @@ -165,7 +166,7 @@ abstract class AbstractTransactSQLDialect extends Dialect { } public String applyLocksToSql(String sql, LockOptions aliasedLockOptions, Map keyColumnNames) { - // TODO: merge additional lockoptions support in Dialect.applyLocksToSql + // TODO: merge additional lockoptions support in Dialect.applyLocksToSql Iterator itr = aliasedLockOptions.getAliasLockIterator(); StringBuffer buffer = new StringBuffer( sql ); int correction = 0; diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/SybaseASE15Dialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/SybaseASE15Dialect.java index 8741f492b9..a1f58c843e 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/SybaseASE15Dialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/SybaseASE15Dialect.java @@ -48,7 +48,6 @@ public class SybaseASE15Dialect extends AbstractTransactSQLDialect { registerColumnType( Types.DATE, "date" ); registerColumnType( Types.DECIMAL, "numeric($p,$s)" ); registerColumnType( Types.TIME, "time" ); - registerColumnType( Types.BINARY, "binary($l)" ); registerColumnType( Types.REAL, "real" ); registerColumnType( Types.BOOLEAN, "tinyint" );