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

This commit is contained in:
Rob Bygrave
2017-03-13 23:13:41 +13:00
parent 4d82b86f81
commit 7178085680
3 changed files with 24 additions and 0 deletions
@@ -1,6 +1,7 @@
package org.tests.transaction;
import io.ebean.BaseTestCase;
import io.ebean.Ebean;
import io.ebean.annotation.Transactional;
import org.junit.Test;
import org.tests.model.m2m.MnyB;
@@ -23,5 +24,9 @@ public class TestBatchModelFlush extends BaseTestCase {
bean2.db().flush();
new MnyB("TestBatchModelFlush_4").save();
Ebean.flush();
// the rest is flushed on commit
new MnyB("TestBatchModelFlush_5").save();
}
}