I have Inputstream/byte[] of an image file, which I want to store in DB, but I already stored the entity only I want to update the blob field, I have Id of the row.
I tried following but it is not working for me:
Query query = session.createSQLQuery( "update tableName set blobFieldName=:blbContent where id=5);
query.setBinary("blbContent",myByteArray)
int val = query.executeUpdate();
n this val returned 1, but actually in DB there is no updation happened...I can't understand where I'm wrong. Please help me. I need this working...