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

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: EAP_EWP 5.1.0_CR1, EAP_EWP 5.1.0
    • Fix Version/s: EAP_EWP 5.1.1
    • Component/s: Hibernate
    • Labels:
      None
    • Environment:

      MS SQL SERVER 2008 with jdbc 3.0 driver

    • Affects:
      Release Notes
    • Workaround:
      Workaround Exists
    • Workaround Description:
      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) ); } }
    • Release Notes Text:
      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.
    • Release Notes Docs Status:
      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  stliu Strong Liu
                  Reporter:
                  stliu Strong Liu
                  Writer:
                  Misty Stanley-Jones
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: