Ok, I'm trying to persist binary data in Oracle9i using hibernate, and I have finally gave up on using byte[] or InputStream as the type of my property, so now I'm using java.sql.Blob.
I assign the using the following sentence
Code:
Session hibernateSession = sessionFactory.openSession( );
Transaction transaction = hibernateSession.beginTransaction( );
Publication publication = (Publication) hibernateSession.load( Publication.class, contactActionForm.getPublicationId( ) );
ContactInformation contact = publication.getContact( );
(snip)
contact.getPicture( ).setContent( Hibernate.createBlob( contactActionForm.getPicture().getInputStream() ) );
hibernateSession.save( publication );
transaction.commit( );
And then, when trying to commit I get an SQLException with the message "streams type cannot be used in batching". So what the @#$% am I doing wrong?
Regards
Jose