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

Document - 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.2 ER1
    • EAP_EWP 5.1.0_CR1, EAP_EWP 5.1.0
    • Documentation
    • 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) ); } }
    • Not Required

    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

              rdickens_jira Russell Dickenson (Inactive)
              shaozliu Strong Liu(刘少壮) (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: