mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#993 - ENH: Add flush() to EbeanServer and Model to make it more accessible than the current transaction.flushBatch()
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user