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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • EAP_EWP 5.1.1
    • EAP_EWP 5.1.0_CR1, EAP_EWP 5.1.0
    • 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

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              shaozliu Strong Liu(刘少壮) (Inactive)
              shaozliu Strong Liu(刘少壮) (Inactive)
              Misty Stanley-Jones Misty Stanley-Jones (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: