PostgreSQL problem when using @Lob on String field
--------------------------------------------------
Key: HHH-6105
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-6105
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.6.3, 3.6.2, 3.6.1, 3.6.0
Environment: postgresql:8.3-606.jdbc3
Reporter: Roelof Jan Koekoek
After upgrading from 3.5.6 to 3.6 we ran into issues using @Lob on String fields
previously mapping to PostgreSQL's TEXT type. When loading these fields the PostgreSQL
driver returns a:
"org.postgresql.util.PSQLException: Bad value for type long: Text content..."
The problem can be traced to Hibernates ClobTypeDescriptor which calls a
resultSet.getClob("lobfield"). Apparently it expects an OID pointing to a clob
and not the text field.
I found a lengthy discussion on this subject here:
http://groups.google.com/group/pgsql.interfaces.jdbc/browse_thread/thread...
At the bottom of the discussion a workaround is mentioned. Using
@Type(type="org.hibernate.type.StringClobType") on the @Lob String fields gets
things working as before, but this is a deprecated solution.
--
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira