gargrishi wrote:
Ok,
I got the problem. You were right. The object state is being changed. I have a column name update_date in the table. In object instance i pass "new Date()" in the "get" method.
Now this actually changes when the data is being commited to the DB. So it first make an insert to the DB and then makes an update to update the chnaged value of update_date which would change because of some micro seconds difference.
But then how do i insert an update_date to my column which would be current date without this update being called. I am not really bothered about the exact time being inserted.
look at the <timestamp> mapping in hibernate if this is a timeLastUpdated type of attribute.