[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3240) In Derby field type 'text' is converted to CLOB(255)

Aleksander Rozman (JIRA) noreply at atlassian.com
Wed Apr 16 10:16:33 EDT 2008


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

Aleksander Rozman commented on HHH-3240:
----------------------------------------

Hi !
Will try to do this over weekend. Problem is not so urgent anymore since I decided to use another database... 

But the fact is... Text type is mapped into Types.CLOB, and definition in Derby (actually D2) is 
		registerColumnType( Types.CLOB, "clob($l)" );

Now we must only find who decides that text size should be 255.... I have posted same problem on Derby JIRA and they are blaming Hibernate... I imagine same will happen here.

Link is 
https://issues.apache.org/jira/browse/DERBY-3621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel

I made "hack" in code in which I set clob like this
		registerColumnType( Types.CLOB, "clob(255K)" );
but as I said this is only hack... 

I hope I will have time to create you test case, although I am very busy... Simple how-to is to change column type to "text" and create database and it will happen (I use new SchemaExport(m_cfg).create(true, true)  to create db, m_cfg is configuration). You should see in create script that type is now clob(255). Try writing string larger than 255 into it and my exception will follow. Please look JIRA on Derby I have posted more info there that should help.

Andy

> In Derby field type 'text' is converted to CLOB(255)
> ----------------------------------------------------
>
>                 Key: HHH-3240
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3240
>             Project: Hibernate3
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.1
>         Environment: Hibernate 3.1, Derby 10.3.2.1
>            Reporter: Aleksander Rozman
>            Priority: Blocker
>
> When using type 'text' this is incorectly converted to CLOB(255). Derby has several long var char types which could be used instead, but instead it's defaulted to clob(255). 
> I have taken a look at source from 3.1 and 3.2.6 (latest) and this code is still the same... I think that just little fix in DerbyDialect would be enough... I would try this myself but I am currently lacking time and resources.
> I hope this will be taken care of as soon as it gets...

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