[hibernate-commits] Hibernate SVN: r15719 - core/branches/Branch_3_2/src/org/hibernate/dialect.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Fri Dec 19 19:33:50 EST 2008


Author: gbadner
Date: 2008-12-19 19:33:49 -0500 (Fri, 19 Dec 2008)
New Revision: 15719

Modified:
   core/branches/Branch_3_2/src/org/hibernate/dialect/SQLServerDialect.java
   core/branches/Branch_3_2/src/org/hibernate/dialect/SybaseDialect.java
Log:
HHH-3672 - Sybase - second(), minute(), hour(), and extract() cause GenericJDBCException


Modified: core/branches/Branch_3_2/src/org/hibernate/dialect/SQLServerDialect.java
===================================================================
--- core/branches/Branch_3_2/src/org/hibernate/dialect/SQLServerDialect.java	2008-12-20 00:32:37 UTC (rev 15718)
+++ core/branches/Branch_3_2/src/org/hibernate/dialect/SQLServerDialect.java	2008-12-20 00:33:49 UTC (rev 15719)
@@ -20,12 +20,8 @@
 		registerColumnType( Types.VARBINARY, "image" );
 		registerColumnType( Types.VARBINARY, 8000, "varbinary($l)" );
 
-		registerFunction( "second", new SQLFunctionTemplate(Hibernate.INTEGER, "datepart(second, ?1)") );
-		registerFunction( "minute", new SQLFunctionTemplate(Hibernate.INTEGER, "datepart(minute, ?1)") );
-		registerFunction( "hour", new SQLFunctionTemplate(Hibernate.INTEGER, "datepart(hour, ?1)") );
 		registerFunction( "locate", new StandardSQLFunction("charindex", Hibernate.INTEGER) );
 
-		registerFunction( "extract", new SQLFunctionTemplate( Hibernate.INTEGER, "datepart(?1, ?3)" ) );
 		registerFunction( "mod", new SQLFunctionTemplate( Hibernate.INTEGER, "?1 % ?2" ) );
 		registerFunction( "bit_length", new SQLFunctionTemplate( Hibernate.INTEGER, "datalength(?1) * 8" ) );
 

Modified: core/branches/Branch_3_2/src/org/hibernate/dialect/SybaseDialect.java
===================================================================
--- core/branches/Branch_3_2/src/org/hibernate/dialect/SybaseDialect.java	2008-12-20 00:32:37 UTC (rev 15718)
+++ core/branches/Branch_3_2/src/org/hibernate/dialect/SybaseDialect.java	2008-12-20 00:33:49 UTC (rev 15719)
@@ -65,6 +65,10 @@
 		registerFunction( "month", new StandardSQLFunction("month", Hibernate.INTEGER) );
 		registerFunction( "year", new StandardSQLFunction("year", Hibernate.INTEGER) );
 		registerFunction( "datename", new StandardSQLFunction("datename", Hibernate.STRING) );
+		registerFunction( "second", new SQLFunctionTemplate(Hibernate.INTEGER, "datepart(second, ?1)") );
+		registerFunction( "minute", new SQLFunctionTemplate(Hibernate.INTEGER, "datepart(minute, ?1)") );
+		registerFunction( "hour", new SQLFunctionTemplate(Hibernate.INTEGER, "datepart(hour, ?1)") );
+		registerFunction( "extract", new SQLFunctionTemplate( Hibernate.INTEGER, "datepart(?1, ?3)" ) );
 
 		registerFunction( "abs", new StandardSQLFunction("abs") );
 		registerFunction( "sign", new StandardSQLFunction("sign", Hibernate.INTEGER) );




More information about the hibernate-commits mailing list