edalquist/hibernate-core — comment on commit ec86bf9d1f80bd662986cb7d22c0ac8c2726cb5e
File:  line 0
By pb00067:

Implicite flushes are something very horrible to me:
Unneccessary flushings often creates serious implications when working with long-time transactions.
On long-time transactions the time-window between flush and final commit become big enough
to cause lock-timeouts on concurrent transactions.

In my opion, like on all Hibernate Query-Apis, the user should have the possibility to choose between variuos FlushModes.
Example solution:

SimpleNaturalIdLoadAccess naturalIdAccess = session.bySimpleNaturalId(MyEntity.class);
naturalIdAccess.setFlushMode(FlushMode.AUTO); // flush if required
naturalIdAccess.setFlushMode(FlushMode.COMMIT); // don't flush until commit time
Object obj = naturalIdAccess.load(id);