https://www.objectdb.com/api/java/jpa/EntityManager/setFlushMode(FlushModeType)
jakarta.persistence.EntityManager.setFlushMode(FlushModeType) - JPA 3.2 Extended API Reference
Set the flush mode that applies to all objects contained in the persistence context.
jakarta persistenceextended apientitymanagersetflushmode