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

Gail Badner (JIRA) noreply at atlassian.com
Tue Aug 16 17:28:05 EDT 2011


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gail Badner resolved HHH-5857.
------------------------------

    Resolution: Duplicate
      Assignee: Gail Badner

> 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
>            Assignee: Gail Badner
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list