In my application, data gets loaded from screen search feature for an entity. Then the user can change data and click update. I use struts. In the DAO layer after all validations, i load a hibernate object, set new values and do a save() and flush(). It inserts or updates the data fine.
My issue is when the user does not change anything and clicks update button, hibernate still updates the row with the same data. Only thing that is changes is the changeTime that gets updated by a trigger. Also the trigger inserts a row into history table. So i see a new row in history table for every empty update.
Is there any solution for this? Does any one else also have same issue.
iam using hibernate 2.
Thanks a lot.
|