2017  Kodetalk | Feedback | Privacy Policy | Terms | About

Achieve optimistic locking incase deletion or reinsertion for the same records in hibernate

I know that generally we achieve optimistic locking by using separate version column in our table. But my question is, can we  achieve the same if any records deleted or inserted from the table? 
No, We can't  because it uses version field from the row which will not be available when you delete that.
Answer is