[odb-users] Storing files in an oracle database

Marcel Nehring mne at qosmotec.com
Wed Feb 18 08:25:32 EST 2015

Hello all,

I want to use Oracle's BFILE column type to store a binary file in the database. ODB does not come with a mapping for this DB type and I don't want to have the possibly large file floating around in memory anyway.
My first idea was to use something like a virtual data member without having any representation of it in my persistent class. I want ODB to generate an additional column of type BFILE in my table but I don't want to have a member representing this column in my class. Instead I thought of loading the corresponding file manually in chunks and store it locally on disk. However, ODB does not support such virtual data members and I don't have any idea on how to manually load the file from the database using only ODB.
Custom mapping functions would require to have a data member in my class representing the file which I would like to avoid.

Anyone already used ODB with BFILE columns? Any suggestions how to handle BFILE columns with ODB? A completely different approach might also be an option.


More information about the odb-users mailing list