CLOB lenght problme on different databases [message #506367] |
Thu, 07 January 2010 05:25 |
Patrick Haun Messages: 30 Registered: October 2009 |
Member |
|
|
Hi,
I use a CLOB column to store a large text in the database.
I work with a test string which contains 500000 characters.
Define that column like this:
@Lob
@Basic(fetch = FetchType.LAZY)
@Column(name = "DSGN_CNTNT", columnDefinition = "CLOB(600000)")
works with DB2 and Derby
Define that column like this:
@Lob
@Basic(fetch = FetchType.LAZY)
@Column(name = "DSGN_CNTNT")
works with pgsql and oracle
Is there a nice solution for this problem?
[Updated on: Thu, 07 January 2010 10:27] Report message to a moderator
|
|
|
|
|
|
Re: CLOB lenght problme on different databases [message #506976 is a reply to message #506367] |
Mon, 11 January 2010 15:28 |
|
Why doesn't it? What error do you get? This should work.
The issue seems to be that some database require a size for CLOB, and some don't. We changed the default size for Derby to be the max clob size, so it should work now if you do not set the size.
For DB2 we are currently defaulting the size to 64,000. We should probably default it to be larger, or the DB2 max. Also the same limit is currently used for MySQL. Please log a bug to have the default sizes increased.
James : Wiki : Book : Blog : Twitter
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04019 seconds