Sometimes the Session will execute the SQL statements needed to synchronize the JDBC connection’s state with the state of objects held in memory. This process, called flush, occurs by default at the following points:

before some query executions
from org.hibernate.Transaction.commit()
from Session.flush()

Advertisements