Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-5390

CLONE - HHH-5420 introducing new dialect for ms sql server 2008 with jdbc 3.0 and above

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.3.0.GA_CP10
    • 4.3.0.GA_CP09
    • Hibernate
    • None
    • MS SQL SERVER 2008 with jdbc 3.0 driver

    • Release Notes
    • Workaround Exists
    • Hide

      defining the new dialect like below,

      public class SQLServer2008Dialect extends SQLServerDialect {
      public SQLServer2008Dialect()

      { registerColumnType( Types.DATE, "date" ); registerColumnType( Types.TIME, "time" ); registerColumnType( Types.TIMESTAMP, "datetime2" ); registerFunction( "current_timestamp", new NoArgSQLFunction("current_timestamp", Hibernate.TIMESTAMP,false) ); }

      }

      Show
      defining the new dialect like below, public class SQLServer2008Dialect extends SQLServerDialect { public SQLServer2008Dialect() { registerColumnType( Types.DATE, "date" ); registerColumnType( Types.TIME, "time" ); registerColumnType( Types.TIMESTAMP, "datetime2" ); registerFunction( "current_timestamp", new NoArgSQLFunction("current_timestamp", Hibernate.TIMESTAMP,false) ); } }
    • Dialect <code>org.hibernate.dialect.SQLServer2008Dialect</code> has been added to Hibernate, to address changes to the Microsoft SQL dialect introduced in Microsoft SQL Server version 2008.
    • Documented as Resolved Issue
    • ON_QA

      http://opensource.atlassian.com/projects/hibernate/browse/HHH-5420

      with the new released jdbc 3.0 driver of ms sql server 2008, there are something in the date type changed.
      The Microsoft SQL Server JDBC Driver 3.0 now supports the following SQL Server data types:

      time

      date

      datetime2

      datetimeoffset

      For more information about these SQL Server types, see Date and Time Data Types and Functions (Transact-SQL) .

      and without this dialect, org.hibernate.test.hql.ASTParserLoadingTest and org.hibernate.test.stateless.StatelessSessionTest fail.

      -------

      For EAP 4.3 CP09, the following tests are failing:

      • ComponentTest.testComponentStateChangeAndDirtiness
      • DynamicFilterTest.testHQLSubqueryWithFilters
      • SQLFunctionsTest.testBroken
      • SQLLoaderTest.testTS

              shaozliu Strong Liu(刘少壮) (Inactive)
              jpkroehling@redhat.com Juraci Paixão Kröhling (Inactive)
              Jared Morgan Jared Morgan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: