[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2969) DB2Dialect Clob SchemaExport uses default length even if no length set

Philippe Mouawad (JIRA) noreply at atlassian.com
Wed Dec 12 17:06:57 EST 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_29150 ] 

Philippe Mouawad commented on HHH-2969:
---------------------------------------

I found 2 useful links that give information about LOBs:
http://www.dbazine.com/db2/db2-mfarticles/mullins-lobs
http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/ad/c0006327.htm

Failure to specify a size causes DB2 to use the following default:
+ For BLOBs - 1 MB (or 1,048,576 bytes)
+ For CLOBs - 1,048,576 single byte characters
+ For DBCLOBs - 524,288 double-byte characters 

"The maximum size for each large object column is part of the declaration of the large object type in the CREATE TABLE statement. The maximum size of a large object column determines the maximum size of any LOB descriptor in that column."

Philippe.

> DB2Dialect Clob SchemaExport uses default length even if no length set
> ----------------------------------------------------------------------
>
>                 Key: HHH-2969
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2969
>             Project: Hibernate3
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.2.5
>         Environment: Hibernate 3.2.5, DB2 8, DB2 9
>            Reporter: Philippe Mouawad
>         Attachments: db2-clob-schemaExport-patch.txt
>
>
> I have this property in my mapping:
> 		<property
> 			name="argumentsValues"
> 			column="cte_arguments_values"
> 			type="text"
> 			not-null="true"
> 		/>
> Notice no length is set.
> Hibernate schema Export generates:
>         cte_arguments_names clob(255) not null,
> Same problem occurs for Clob and Blob.
> This is due to the following lines in org.hibernate.dialect.DB2Dialect:
> 		registerColumnType( Types.BLOB, "blob($l)" );
> 		registerColumnType( Types.CLOB, "clob($l)" );
> Attached is the patch.
> There would be another solution to test that Column has no length set.
> Philippe.
> www.ubik-ingenierie.com

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