-->
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: issue update SQL only if bean property changed
PostPosted: Mon May 16, 2005 1:21 pm 
Regular
Regular

Joined: Mon Sep 20, 2004 8:42 am
Posts: 58
Location: Boston, US
Hibernate version:3.0.3

Name and version of the database you are using:Oracle 9.1

I'm using the OSIV pattern in my web app which is built using Spring MVC.
In my UI, I have an editable table where one or more rows can be changed by the user before he hits the 'Save' button. The Spring binding mechanism binds *all* of the input fields to the POJO's, regardless of whether the user modified any row property. As a result if I simply load the page where the UI table size is 100 rows and click save, Hibernate issues 100 update queries.

How do I solve this problem where only modified beans result in an update query being issued.

Is there some way to handle this is Hibernate? Or should the binding mechanism be enhanced so that bean property setter is called only if value (obtained by getter) is different from new value.

Thanks,
Sanjiv


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.