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
|
|