zesj wrote:
I appreciate the referece, but at best that's a workaround. Not a very elegant one, IMHO.
Actually, that pattern (as described) seems rather pointless. From what I understand (and verified myself in the Firebird JDBC driver), blobs typically aren't streamed with the query. Usually they are only streamed when the java.sql.Blob is accessed via getBinaryStream() or getBytes(). This makes sense because all databases that I am aware of store only a pointer to the blob in the row; the blob itself is stored in some other page or series of pages. Streaming the blob data along with the data rows would require jumping the disk head all over the db "file".
The inheritance strategy would probably make the Hibernate cache do what I want, but I'm not sure I can use it. I navigate to my Picture objects by traversing a relationship which presumably would have to be established to the full version of the Picture.
Thanks though.
Jeff