Created
November 3, 2009 22:51
Revisions
-
vgrichina revised this gist
Nov 12, 2009 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,9 +22,9 @@ public SQLServerDialect() { registerColumnType(Types.CHAR, "nchar(1)"); registerColumnType(Types.VARCHAR, 4000, "nvarchar($l)"); registerColumnType(Types.VARCHAR, "nvarchar(max)"); registerColumnType(Types.VARBINARY, 4000, "varbinary($1)"); registerColumnType(Types.VARBINARY, "varbinary(max)"); registerColumnType(Types.BLOB, "varbinary(max)"); registerColumnType(Types.CLOB, "nvarchar(max)"); } } -
vgrichina created this gist
Nov 3, 2009 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ /* * Copyright © 2009, Componentix. All rights reserved. */ package com.componentix.hibernate.dialect; import java.sql.Types; /** * A proper dialect for Microsoft SQL Server 2000 and 2005. * * @author Yuri Sakhno (George1) */ public class SQLServerDialect extends org.hibernate.dialect.SQLServerDialect { /** * Initializes a new instance of the {@link SQLServerDialect} class. */ public SQLServerDialect() { registerColumnType(Types.BIGINT, "bigint"); registerColumnType(Types.BIT, "bit"); registerColumnType(Types.CHAR, "nchar(1)"); registerColumnType(Types.VARCHAR, 4000, "nvarchar($l)"); registerColumnType(Types.VARCHAR, "nvarchar(max)"); registerColumnType(Types.VARBINARY, 4000, "nvarbinary($1)"); registerColumnType(Types.VARBINARY, "nvarbinary(max)"); registerColumnType(Types.BLOB, "nvarbinary(max)"); registerColumnType(Types.CLOB, "nvarchar(max)"); } }