Question: What is the dirty checking feature of Hibernate?
What is the dirty checking feature of Hibernate?
Hibernate allows dirty checking feature.All persistent objects are monitored by hibernate.it detects which objects have been modified and then calls update statements on all updated objects.the process of updating the changed object is called automatic dirty checking.
Dirty checking allows the user or developer to avoid the time consuming databases write actions. This feature makes necessary updations and changes to the fields which require a change, remaining fields are left unchanged or untouched.
Hibernate dirty check is a feature of hibernate that save the time and effort to update the database when states of objects are modified inside a transaction. Hibernate automatically detects the object states whenever changed and synchronized with the database in order to update.