[hibernate-issues] [Hibernate-JIRA] Issue Comment Edited: (HHH-4098) VARBINARY should be BLOB in DB2400Dialect

Richard Eckart de Castilho (JIRA) noreply at atlassian.com
Sun Jun 19 09:39:18 EDT 2011


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

Richard Eckart de Castilho edited comment on HHH-4098 at 6/19/11 8:39 AM:
--------------------------------------------------------------------------

I have a similar problem with DerbyDialect (which inherits from DB2Dialect) and VARBINARY. The VARBINARY in Derby is limited to 32k but the declared length in my application is way larger. I am also using MySql and Postgres, which both properly handle VARBINARY as large data types. MySQLDialect maps it to variants of BLOB depending on the declared length while PostgreSQL maps it to BYTEA.

(Hibernate Core 3.6.5.Final)

      was (Author: rec):
    I have a similar problem with DerbyDialect (which inherits from DB2Dialect) and VARBINARY. The VARBINARY in Derby is limited to 32k but the declared length in my application is way larger. I am also using MySql and Postgres, which both properly handle VARBINARY as large data types. MySQLDialect maps it to variants of BLOB depending on the declared length while PostgreSQL maps it to BYTEA.
  
> VARBINARY should be BLOB in DB2400Dialect
> -----------------------------------------
>
>                 Key: HHH-4098
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4098
>             Project: Hibernate Core
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 3.5.0.Beta-1
>         Environment: tested with hibernate 3.2.6ga, IBM DB2/400 on i5/os V5R4
>            Reporter: Christian Luebke
>            Priority: Minor
>
> VARBINARY is registered in DB2Dialect (superclass of DB2400Dialect) as "varchar($l) for bit data". As DB2/400 (aka IBM DB2 for i) has a record length limitation of 32766 bytes, VARBINARY should be implemented as BLOB. Blobs are being stored outside the db record.
> I successfully tried adding the following constructor in DB2400Dialect.java:
>     public DB2400Dialect() {
>         super();
>         registerColumnType( Types.VARBINARY, "blob($l)" );
>     }
> As I'm not a hibernate user by myself, I can't provide a test case. I tried to get Bonita Workflow (http://www.bonitasoft.com/) to run with my DB2/400. It failed initially because of the usage of a 64 K varbinary. After patching DB2400Dialect to use a blob, everything worked fine.

-- 
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