[
https://hibernate.onjira.com/browse/HHH-7264?page=com.atlassian.jira.plug...
]
ian mockford commented on HHH-7264:
-----------------------------------
Creating a custom dialect FixedDerbyDialect.java
{code:java}
package org.hibernate.testing.derby;
import java.sql.Types;
import org.hibernate.dialect.DerbyTenSevenDialect;
public class FixedDerbyDialect extends DerbyTenSevenDialect {
public FixedDerbyDialect() {
super();
registerColumnType(Types.CLOB, "clob");
}
}
{code}
Seems to fix the problem, so maybe this could be added into
org.hibernate.dialect.DerbyDialect.java as was done for BLOB in commit
https://github.com/hibernate/hibernate-orm/commit/a2bae5a18c23f4916a5c3c6...
CLOB Length Set to 255 By Default With Derby DB
-----------------------------------------------
Key: HHH-7264
URL:
https://hibernate.onjira.com/browse/HHH-7264
Project: Hibernate ORM
Issue Type: Bug
Components: core
Affects Versions: 4.0.1
Environment: Derby 10.8.2.2
Reporter: ian mockford
Attachments: hibernate-derby-test.zip
When using JPA/Hibernate with a Derby DB, an @Lob annotation on a String gets truncated
to a max of 255 chars.
For example:
private String message;
@Lob
@Column(name = "MESSAGE")
public String getMessage() {
return message;
}
Attached is a Maven project with a test case showing the problem; the Derby can be
changed to H2 to make the tests pass.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira