Hi everyone,
I need to force Hibernate to use the binary type to handle blobs.
I'm trying to use Hibernate 3.1 with a PostgreSQL database and Sequoia (cluster module) in the middle. Unfortunately, Sequoia only handles Blobs as Inputstreams and does not handle oids like PostgreSQL.
I tried to create a SequoiaPostgreSQLDialect which basically contains in the constructor:
registerHibernateType( Types.BLOB, org.hibernate.Hibernate.BINARY.getName() );
registerColumnType( Types.BLOB, "bytea" );
and has a method:
public boolean useInputStreamToInsertBlob() {
return true;
}
But unfortunately, it seems that Hibernate still handles blobs by calling the BlobType class and its "get" method when it comes to retrieving the blob from the database.
Would anyone have any advice as to how I can set Hibernate to use the type Hibernate.BINARY to handle blobs?
Thanks a lot in advance
|