Multiple choice technology web technology

Which is the function call ensure that SQL statement is executed?

  1. commit()

  2. flush()

  3. close()

  4. list()

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The flush() method forces Hibernate to synchronize the in-memory state of the session with the underlying database by executing the necessary SQL statements (INSERT, UPDATE, DELETE) immediately, without committing the transaction.