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

Christian Luebke (JIRA) noreply at atlassian.com
Wed Aug 19 07:06:15 EDT 2009


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