Announcement Announcement Module
Collapse
No announcement yet.
Avoiding unneeded updates Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Avoiding unneeded updates

    Hello,

    I am using Hibernate with Spring in a web form based application. When users browse through a form (clicking "next" or "back"), and they do not make changes to the fom data, I want to avoid an update statement from being executed on data that has not been changed. Is there any way to avoid these unneeded updates?

    Thanks.

  • #2
    Well, you can set your transactions to readonly if you know you will not be updating the data. In that case, the commit and flush would not be called.

    Take a look at the Transaction section of the Spring manual for info on doing this.

    Regards,

    Comment


    • #3
      The problem is that you do not know if the user has changed data. For those pages where he made a change you want to issue an update, for those that he left unchanged, you want to do nothing.

      Comment

      Working...
      X