When we are updating a record, we can use session.flush() with Hibernate. What\'s the need for flush()?
session.flush()
flush()
With this method you evoke the flush process. This process synchronizes the state of your database with state of your session by detecting state changes and executing the respective SQL statements.