-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: how to change a blob mapping
PostPosted: Sun Oct 17, 2010 10:49 am 
Newbie

Joined: Wed Apr 08, 2009 1:11 pm
Posts: 19
Hi,

I have an entity that holds a Blob, and when the entity is first saved, the blob is null. When I want to associate an inputstream with that blob field, I use a setter method for that blob field, and just set the blob in a session. When the session is complete the blob is in the database and can be retrieved.

Now, I want to change that blob. I use the same code that set it in the first place, while it was null, in that I start a hibernate session, get my new blob inputstream, and set the (new) sql.Blob into the setter for that field, and then end the session.

I don't get an exception in the session completion code, but when I retrieve the blob from the database, it is still the old value!!!

How to do this?

Andy


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.