[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?) :)