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

ian mockford (JIRA) noreply at atlassian.com
Wed Apr 18 04:33:50 EDT 2012


    [ https://hibernate.onjira.com/browse/HHH-3240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46335#comment-46335 ] 

ian mockford commented on HHH-3240:
-----------------------------------

I don't think this issue is resolved. A similar issue with Derby but with BLOB not CLOB was fixed in HHH-2614 (Blob Length Set to 255 By Default With Derby DB).

The suggestion by [~steve]:

{quote}You would want to create a custom dialect that says:
registerColumnType( Types.CLOB, "clob" );
{quote}
seems to work, and looking at the changes in HHH-2614 it seems that a similar change should be made to fix this issue.

(For info, a simple way of testing this is to use the @Lob annotation on a String column when using JPA backed by Hibernate & Derby)
(Hibernate 4.0.1; Derby 10.8.2.2)

> In Derby field type 'text' is converted to CLOB(255)
> ----------------------------------------------------
>
>                 Key: HHH-3240
>                 URL: https://hibernate.onjira.com/browse/HHH-3240
>             Project: Hibernate ORM
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.1
>         Environment: Hibernate 3.1, Derby 10.3.2.1
>            Reporter: Aleksander Rozman
>            Assignee: Strong Liu
>             Fix For: 3.5.0.Beta-1, 3.5.0-Beta-2, 3.5.0-Beta-3
>
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list