-->
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: Advice on BLOB -like cols and HSQLDB / Oracle / PostgreSQL
PostPosted: Wed Sep 01, 2004 6:43 am 
Newbie

Joined: Tue Mar 02, 2004 2:22 am
Posts: 5
[b]Hibernate version:[/b]
Latest, 2.1.6

[b]Mapping documents:[/b]

A table (preferably only 1 table) with 2 BLOB like columns:
- one for a file that can be well over a couple of MBs
- one for a signature for the first file, maybe a couple of KB, but very likely more than 2K.

[b]Name and version of the database you are using:[/b]

PostgreSQL 7.4
HSQLDB 1.7.2
Oracle 9i

[b]My question:[/b]

What is the recommended way to implement that?!?!

I've tried columns of type BLOB, but then there was a problem with Postgres, as some other users have noticed (http://forum.hibernate.org/viewtopic.php?t=931121)

I switched to varbinary, it worked for Postgres and HSQLDB, but then I bumped into 2000 bytes restriction with Oracle (currently 255 bytes, see http://forum.hibernate.org/viewtopic.php?p=2205909)

Then I tried to use "long raw" with Oracle following the hint from
http://forum.hibernate.org/viewtopic.php?t=925859
but that did not work either because I wanted 2 long raws in the same table (have not tried this for the other 2 databases)

My reason for using Hibernate was to have only 1 implementation and (as much as possible) forget the database specifics - probably like everybody else - and this far I've been pretty happy with Hibernate abstraction level. Is it so that I can't count on Hibernate this time? (Yet?) :)


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.