Monday, 27 July 2015

Versioning of An Object in Hibernate

As we know that the Hibernate API provide us to save, retrieve, update and delete data features, but it's not just that it provides more than that. In traditional database
programming what we do to check the data is being modified, answer is that we need to create an extra column for the modify status and every time the data is changed we need to fire a update query to update the modify status.

When we use versioning using hibernate, the first time when the object will save in the database, hibernate inserts zero as a value in version number field. And after every time when the object will update, hibernate will increment that version number by one automatically.

To know more about Versioning of An Object in Hibernate visit FindNerd.

You can also ask questions at findnerd related to android, php, c, java programming questions and answers etc., and get instant solutions of these queries.

No comments:

Post a Comment