#993 - ENH: Add flush() to EbeanServer and Model to make it more accessible than the current transaction.flushBatch()

This commit is contained in:
Rob Bygrave committed 2017-03-13 23:07:17 +13:00
1 parent 1d99a5c5a4
commit 4d82b86f81
8 files changed
+81 -2

No files matched your search

@@ -840,6 +840,11 @@ public final class DefaultServer implements SpiServer, SpiEbeanServer {
return transactionScopeManager.get();
}
@Override
public void flush() {
currentTransaction().flush();
}
/**
* Commit the current transaction.
*/
@@ -731,13 +731,18 @@ public class JdbcTransaction implements SpiTransaction {
* </p>
*/
@Override
public void flushBatch() {
public void flush() {
if (!isActive()) {
throw new IllegalStateException(illegalStateMessage);
}
internalBatchFlush();
}
@Override
public void flushBatch() {
flush();
}
/**
* Flush the JDBC batch and execute derived relationship statements if necessary.
*/