-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: blobs as inpustream with postgresql (and Sequoia)
PostPosted: Fri Feb 03, 2006 4:30 am 
Newbie

Joined: Wed Dec 24, 2003 6:37 am
Posts: 8
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.