db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Björn Voigt <bvo...@hs-harz.de>
Subject problems with storing byte[] to postgres7.3
Date Mon, 22 Sep 2003 14:58:49 GMT
Howdy ojb developers,

I changed from mapping tool castor to ojb and have some
problems to store byte[] correctly to a my postgres table.

I am using Postgres 7.3 and I want to store images to an
bytea field in my picture table.

First I tried to map the byte[] to BINARY but if I load
the Object from DB I get an byte[] with an bigger length
than the original array back.

In a second test I tried to map the array to BLOB and convert
it in a own FieldConversion to byte[]. But I cant get in the
sqlToJava() the Blob, because there is an Exception in JDBC-Driver before.

I still dont know how, but castor can handle the types without
problems. I wont leave this projekt and change back to castor ;-)

Thank you for any ideas

Björn Voigt

To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org

View raw message