or DefaultLobHandler is fine? I see there is a special handler for Oracle.
I tried DefaultLobHandler, but it gives me error when I try to save the object: SQL error shows that I am trying to insert an expression of bytea to a oid column.
The table is generated by using schemaexport. The code is as follows:
/**
* @return Returns the content.
*
* @hibernate.property
* column="content"
* type="org.springframework.orm.hibernate3.support.B lobByteArrayType"
* update="false"
* not-null="true"
*/
public byte[] getContent() {
return content;
}
/**
* @param content The content to set.
*/
public void setContent(byte[] content) {
this.content = content;
}
When using spring DefaultLobHandler, unit test failed:
[junit] [mytest] ERROR [main] JDBCExceptionReporter.logExceptions(72) | ERROR: column "content" is of type oid but expression is of type bytea
Again, the table is generated by schemaexport - looks like it set the BLOB column to type oid.
Any idea? Thanks.


Reply With Quote