If you override equals, you have to have two VO objects to do the comparison. I think it is better to perform this type of work in one of your business or service methods. You could then let your user know if anything was updated.

Richard



Sent from my iPhone

On Mar 31, 2009, at 6:25 AM, Nicholoz Koka Kiknadze <kikna...@gmail.com> wrote:

No I think. iBatis is not aware whether your VO-s have changed and can not decide whther to run updates or not.




Why don't you override the Object.hashcode() method on your VO and call it and save the value when you retrieve the record. Call it again when the user submits their changes.
If the values are different, the a change was made.

Hm, I usually override equals. Any advantages with hashCode?

But most of the time (being lazy) I execute updates without checking if there were atual changes. You know modern hardware and database software are so fast.

Reply via email to