[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-5857) SQLServer dialect for varbinary incorrect for 2008

Gail Badner (JIRA) noreply at atlassian.com
Thu Jan 20 12:42:05 EST 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=39715#action_39715 ] 

Gail Badner commented on HHH-5857:
----------------------------------

Do the same changes made for HHH-3965 to SQLServer2005Dialect apply to SQLServer2008Dialect?

Currently, SQLServer2008Dialect extends SQLServerDialect. Should it extend SQLServer2005Dialect?

> SQLServer dialect for varbinary incorrect for 2008
> --------------------------------------------------
>
>                 Key: HHH-5857
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5857
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.6.0
>            Reporter: Steve Mactaggart
>
> In SQLServer 2008 the IMAGE data type has been deprecated and replaced with VARBINARY(MAX)
> {quote}
> ntext, text, and image data types will be removed in a future version of Microsoft SQL Server. Avoid using these data types in new development work, and plan to modify applications that currently use them. Use nvarchar(max), varchar(max), and varbinary(max) instead. For more information, see Using Large-Value Data Types.
> {quote}
> The current SQLServer2008Dialect has the mapping (inherirted from SQLServerDialect):
> {code}
> 		registerColumnType( Types.VARBINARY, "image" );
> {code}
> This needs to be reverted to use VARBINARY.
> {code}
> 		registerColumnType( Types.VARBINARY, "varbinary" );
> {code}
> The issue is identified when using hibernate.ddl.auto=validate, it shows an error such as:
> {quote}
> Wrong column type in Database.dbo.BINARY_OBJECT for column BYTES. Found: varbinary, expected: image
> {quote}
> for an annotated fields such as:
> {code}
>     @Column(name = "BYTES", length = 100000, nullable = true)
>     private byte[] bytes;
> {code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list