-->
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 can I avoid unnecessary updates...help!
PostPosted: Tue Aug 18, 2009 8:58 pm 
Newbie

Joined: Tue Aug 18, 2009 8:16 pm
Posts: 2
Hello,

I have a scenario where I have two objects linked by a many-to-one-relationship and the other way by a one-to-many relationship.

T -> B: one-to-many
B->T: many-to-one.

The problem I am encountering is that when T is updated, an update statement is also run for B. Which is necessary sometimes because users can change one of B's properties by accessing T. However, this update statement for B is happening ALL THE TIME even when B's one property is not updated, furthermore the update statement for B is running on all fields even when none of the underlying data has been changed.

The unnecessary updates are greatly affecting performance.

I have tried setting dynamicupdate=true on B's class and have been looking through forums, but have found nothing useful.

Any help would be greatly appreciated.

Thanks,
Marise


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.