-->
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.  [ 2 posts ] 
Author Message
 Post subject: Two Blob Column values getting crossed
PostPosted: Mon Jul 09, 2007 11:33 am 
Newbie

Joined: Mon Jul 09, 2007 11:17 am
Posts: 2
I've got two blob columns in a table corresponding to two java.sql.Blob properties - basically and original image and its thumbnail. If I save only the original, it properly goes into the "FILE_BLOB" column. However if I save both, the original gets inserted into the THUMB_BLOB column and the thumbnail gets inserted into the FILE_BLOB column. I assumed, as is mostly the case, that I was goofing something up and had the pointers crossed somehow but I output the byte count of each property immediately before calling getHibernateTemplate().saveOrUpdate(obj) and they are in their correct properties at this time. I have:

o) Triple checked the mapping is proper and is evidenced by the fact that if I save them individually, they do go into the correct column - this seems to occur when saved together.

o) Intentionally saved the bytes in the wrong column (e.g. thumb->original and original->thumb) and when it gets to the database they are in the "right" column.

o) Tested my thumbnail creation code independently to ensure I'm not inadvertantly modifying the original.

o) and now... I'm here asking for help.

All hints are appreciated. I've made an honest effort to RTFM but I'd humbly accept any links if I've missed something.

Thanks,
--tim

Hibernate version:
3.2.2

Mapping documents:
Can't post, but the columns of concern are:
<property name="fileBlob" column="FILE_BLOB" type="blob"/>
<property name="thumbBlob" column="THUMB_BLOB" type="blob"/>

corresponding to getter/setters of type java.sql.Blob

Full stack trace of any exception that occurs:
no exception

Name and version of the database you are using:
Oracle 10g rel2


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 09, 2007 1:45 pm 
Newbie

Joined: Mon Jul 09, 2007 11:17 am
Posts: 2
Found this[1] seemingly related issue. Unfortunately, I don't know what "seems like your driver messes up" really means. Anyway, hoping that it might help someone help me?

--tim

[1] - http://jira.jboss.com/jira/browse/EJBTHREE-784


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

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.