halcyon wrote:
I am wondering if there is any possible way to stream things into and out of the database using hibernate? My situation is I have potentially large blob objects, that are large enough that I cannot afford the memory to hold onto two copies in memory, thus i would like to stream to/from the database, and only ever hold 1 instance in memory. This can be accomplished using PreparedStatement/ResultSet.. is it doable with hibernate and mysql?
Usual way to handle this stuff is to map the property as type java.sql.Blob (Hibernate type "blob"), and let your JDBC driver take care of the streaming.