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

Philippe Mouawad (JIRA) noreply at atlassian.com
Fri Nov 23 18:42:56 EST 2007


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