How to override the default Hibernate Session FlushMode

Introduction In this article, we are going to see how we can override the default FlushMode used by Hibernate. If you bootstrap Hibernate natively, and not as a JPA provider, the default Hibernate FlushMode.AUTO strategy will be used, which, as explained in this article, does not trigger a Persistence Context flush prior to executing a native SQL query.