I have a file I would like to save as a Blob (or something similar) as a column in a Postgres table.
In my Hibernate mapping I refer to that column as type java.sql.Blob:
<property name="content" type="javax.sql.Blob"> <column name="content" /> </property>
From Java, when I get the record, I am getting a long back there which I guess is some sort of file handle.
I would appreciate it if someone would tell me how to define my Postgres table column and my Hibernate mapping so that the fetch will return the bytes in the (file) blob and not a long.
Thanks for any information you can provide!
|