Dirty checking
Dirty checking is a concept to avoid time consuming database write or update actions.
By this concept, all necessary updating and changes are done without affecting the other fields. Only the changed fields of database are updated and the remaining unchanged fields are left untouched.
Process of monitoring and updating only objects that have changed is called Automatic dirty checking.
Automatic Dirty checking in Hibernate
Automatic dirty checking is a feature of hibernate that saves us the effort of explicitly asking Hibernate to update the database when we modify the state of an object inside a transaction.
Hibernate automatically detects whether an object is modified (or) not and need to be updated.
As long as the object is in persistent state (bound to a particular Session), hibernate monitors any changes to the objects and executes SQL.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.