title: How to create an undo function in spring MVC based web app.?
body: <p>I have an employee and a corresponding employee history table. </p>
  
  <p>Both the tables have same structure. History table is used to track the historical changes made to the employee over a period of time.</p>
  
  <p>Now, I need to add an undo function to the changes made to the employee. </p>
  
  <p>e.g. Employees title is changed on 1st August. Now, This will update the employees title in Employee table and insert an corresponding history record in employee_history table. </p>
  
  <p>Now, I need to undo this change. Employee edit page will have a list of changes made to employee datewise with an undo button beside it. </p>
  
  <p>Clicking on undo should revert changes in Employee table to previous value. Also I think the record in history table which says title is changed, should also be removed. </p>
  
  <p>Also when I revert tghe changes to employee table i.e. revert title to previous title, this will fire an insert to history table, which I dont want. </p>
  
  <p>I am not sure what is the best possible way to do this.</p>
  
  <p>Any suggestions will be helpful. </p>