[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-1501) Derby 10 varchar limit is 32672

Beta (JIRA) noreply at atlassian.com
Tue Sep 29 10:00:50 EDT 2009


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=34081#action_34081 ] 

Beta commented on HHH-1501:
---------------------------

I have this problem fixed by using "long varchar" (it's for strings of any length). I have tested it with a column of 64k and it worked great.

Here is the code:

registerColumnType(Types.VARCHAR, 32672, "varchar($l)");
registerColumnType(Types.VARCHAR, Integer.MAX_VALUE, "long varchar");

I think the best would be to add this code to the DerbyDialect.java



> Derby 10 varchar limit  is 32672
> --------------------------------
>
>                 Key: HHH-1501
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1501
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.1.2
>         Environment: Derby 10
>            Reporter: Sergey Vladimirov
>            Priority: Trivial
>
> Derby 10 varchar limit  is 32672.
> One need to change DB2Dialect and DerbyDialect to create clob columns, if size of text > 32k:
>         registerColumnType(Types.CHAR, 254, "char(1)");
>         registerColumnType(Types.VARCHAR, 32672, "varchar($l)");
>         registerColumnType(Types.VARCHAR, Integer.MAX_VALUE, "clob($l)");
> (BTW, char limit is 254).

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