ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicholoz Koka Kiknadze <kikna...@gmail.com>
Subject Re: How to Compare database record before UPDATE using iBatis?
Date Tue, 31 Mar 2009 13:25:16 GMT
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.

View raw message