What Is Dirty Checking
Dirty Checking Is a Simple Process That Boils Down to a Very Basic Concept: It Checks Whether a Value Has Changed That Hasn’t Yet Been Synchronized Across the...
Dirty checking is a simple process that boils down to a very basic concept: It checks whether a value has changed that hasn’t yet been synchronized across the app.
How can we avoid dirty checking in Hibernate?
A solution to this problem is to change the default configuration of FlushMode from auto to manual by setting FlushMode. MANUAL . In this way the dirty check mechanism will stop causing the aforementioned synchronization.
Must Read
What is SessionFactory in Hibernate?
SessionFactory is an Interface which is present in org. hibernate package and it is used to create Session Object. It is immutable and thread-safe in nature. buildSessionFactory() method gathers the meta-data which is in the cfg Object.