Hi,
I am using postgresql and would like to load a BYTEA column lazily.
1.) Is it possible to let Hibernate load byte[] columns lazily? Hibernate uses the "BYTEA" datatype for byte[] fields by default, so if this can be made lazy all my problems would be solved.
2.) If I use a Blob datatype instead, which I know can be lazily loaded, hibernate uses the "OID" datatype instead of "BYTEA" which breaks my application elsewhere and has a lot more overhead for the small amount of data I plan to store. Is there any way to tell Hibernate to use BYTEA instead of OID for Blob's. Annotating the BLOB with @Type(type="org.hibernate.type.BinaryType") didn't help, it bailed out casting a byte[] (from hibernate) to the blob-type of the entity.
Thank you in advance, Clemens
|