-->
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.  [ 3 posts ] 
Author Message
 Post subject: How does Hibernate check if BLOB field is dirty?
PostPosted: Thu Apr 19, 2007 10:30 pm 
Newbie

Joined: Thu Apr 19, 2007 10:16 pm
Posts: 5
Hi,

Let's say I have this model class:
class Doc {
String name;
Blob content;
}

Every time I update the Doc entity with ONLY the name field value changed, apparently it updates (flushes) the content to the database as well. Since I index the content field, this will make the index out-of-sync.

I've read others having similar problem with the version being updated but couldn't find anyone have the exact problem as mine.

Besides remove the Blob content field to another table. How can I make sure Hibernate does NOT update the Blob field when it's not changed.

I verified this by specify update="false" and no problem.

Hibernate version: 3.2.2GA
Oracle 10g R2

Thanks,
Frank


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 20, 2007 1:17 am 
Regular
Regular

Joined: Mon Mar 26, 2007 12:38 am
Posts: 119
Hi,
>>> How can I make sure Hibernate does NOT update the Blob field when it's not changed.

Try, dynamic-update="true" for the class.
This ensures that only modified columns are included in update query.

---------------------------------------------------------------
Rate the reply if you find it helpful


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 20, 2007 1:04 pm 
Newbie

Joined: Thu Apr 19, 2007 10:16 pm
Posts: 5
pramodkp wrote:
Hi,
>>> How can I make sure Hibernate does NOT update the Blob field when it's not changed.

Try, dynamic-update="true" for the class.
This ensures that only modified columns are included in update query.


Hi,

This does not exactly answer all my questions but thanks very much since I overlooked this option.

--Frank


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.