I've been using hibernate with mysql for a while now with great success. I searched everywhere and could not find a solution to this problem, so thanks for any support you can provide.
I'm currently storing some data as a byte in an object and stored in the mysql database as a blob. This was seamless with hibernate and had no issues. I need to now deal with the data as a stream as it's bad form to carry a 5mb byte.
I added the methods to the object :
java.sql.Blob getBlob() and setBlob( java.jql.Blob)
and added the :
<property name="blob" type="binary" /> (tested with and without the type="binary")
I get the following error if I don't set the blob (would be null)
And I recreate the DB each time. I get the following error when inserting the object:
Hibernate: insert into AUDIO (bytes, name, contentType, blob) values (?, ?, ?, ?)
Exception in thread "main" org.hibernate.exception