-->
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: Lazy byte[] loading - or make a Blob use BYTEA datatype?
PostPosted: Thu Feb 24, 2011 10:23 am 
Beginner
Beginner

Joined: Tue Jul 03, 2007 8:47 am
Posts: 46
Hi,

I am using postgresql and would like to load a BYTEA column lazily.

1.) Is it possible to let Hibernate load byte[] columns lazily?
Hibernate uses the "BYTEA" datatype for byte[] fields by default, so if this can be made lazy all my problems would be solved.

2.) If I use a Blob datatype instead, which I know can be lazily loaded, hibernate uses the "OID" datatype instead of "BYTEA" which breaks my application elsewhere and has a lot more overhead for the small amount of data I plan to store.
Is there any way to tell Hibernate to use BYTEA instead of OID for Blob's. Annotating the BLOB with @Type(type="org.hibernate.type.BinaryType") didn't help, it bailed out casting a byte[] (from hibernate) to the blob-type of the entity.

Thank you in advance, Clemens


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.