-->
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.  [ 4 posts ] 
Author Message
 Post subject: Is there any to update only changed columns
PostPosted: Thu Apr 15, 2004 5:27 pm 
Newbie

Joined: Wed Feb 04, 2004 10:31 pm
Posts: 10
I am working with a database which while poorly written is a well known oracle example - a trigger in the database throws an exception when an update statement updates a particular column to the current value of that column :-( is there any way to cause an update to only update different values rather than doing an update across a row


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 15, 2004 5:47 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
use dynamic-update="true" on the class


Top
 Profile  
 
 Post subject: Dynamic Update
PostPosted: Thu Apr 15, 2004 7:05 pm 
Newbie

Joined: Wed Feb 04, 2004 10:31 pm
Posts: 10
Thank you for your prompt and effective response -
This raises one more question - I have not found an efficient way to log the values which are changed bu dumping the sql I see
Hibernate: update EMPLOYEES set SALARY=? where EMPLOYEE_ID=?
but not the values that are being stored
Also some variables seem to be included in the update that seem not to have changed and others are not there at all and It is unclear where these things are being decided - any hints as to where to look


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 15, 2004 7:08 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Have a log at the provided log4j.properties.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


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