public void flush ();
flush method writes any changes that have
been made in the current transaction to the datastore. If the
EntityManager does not already have a
connection to the datastore, it obtains one for the flush and retains
it for the duration of the transaction. Any exceptions during flush
cause the transaction to be marked for rollback.
See Chapter 9, Transaction.
Flushing requires an active transaction. If there isn't a transaction
in progress, the
flush method throws a
public FlushModeType getFlushMode (); public void setFlushMode (FlushModeType flushMode);
property controls whether to flush transactional changes before
executing queries. This allows the query results to take into account
changes you have made during the current transaction. Available
COMMIT: Only flush when committing, or
when told to do so through the
method. Query results may not take into account changes made
in the current transaction.
AUTO: The implementation is permitted to
flush before queries to ensure that the results reflect the
most recent object state.
You can also set the flush mode on individual
Kodo only flushes before a query if the query might be affected by data changed in the current transaction. Additionally, Kodo allows fine-grained control over flushing behavior. See the Reference Guide's Section 4.9, “Configuring the Use of JDBC Connections”.
public void clear ();