mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-23 07:11:55 +00:00
Revert #1263 - ENH: Make Transaction API Fluid such that we can set multiple thing like batchSize and label in a fluid fashion #1276
This commit is contained in:
1 parent
21182da793
commit
0e219a9bc6
10 files changed
+120
-174
No files matched your search
@@ -34,10 +34,10 @@ public class TestBatchInsertFlush extends BaseTestCase {
|
||||
|
||||
Transaction transaction = server.beginTransaction();
|
||||
try {
|
||||
transaction.setPersistCascade(false)
|
||||
.setBatchSize(10)
|
||||
.setBatch(PersistBatch.ALL)
|
||||
.setLabel("TestBatchInsertFlush.no_cascade");
|
||||
transaction.setPersistCascade(false);
|
||||
transaction.setBatchSize(10);
|
||||
transaction.setBatch(PersistBatch.ALL);
|
||||
transaction.setLabel("TestBatchInsertFlush.no_cascade");
|
||||
|
||||
LoggedSqlCollector.start();
|
||||
|
||||
|
||||
@@ -130,9 +130,9 @@ public class TestBatchInsertSimple extends BaseTestCase {
|
||||
|
||||
Transaction transaction = Ebean.beginTransaction();
|
||||
try {
|
||||
transaction.setBatch(PersistBatch.NONE)
|
||||
.setBatchOnCascade(PersistBatch.ALL)
|
||||
.setBatchSize(20);
|
||||
transaction.setBatch(PersistBatch.NONE);
|
||||
transaction.setBatchOnCascade(PersistBatch.ALL);
|
||||
transaction.setBatchSize(20);
|
||||
|
||||
// escalate based on batchOnCascade value
|
||||
Ebean.saveAll(masters);
|
||||
|
||||
@@ -24,7 +24,8 @@ public class TestSqlServerBatch extends BaseTestCase {
|
||||
|
||||
Transaction txn = Ebean.beginTransaction();
|
||||
try {
|
||||
txn.setBatchMode(true).setBatchSize(3);
|
||||
txn.setBatchMode(true);
|
||||
txn.setBatchSize(3);
|
||||
|
||||
for (int i = 0; i < 10; i++) {
|
||||
ESimple model = new ESimple();
|
||||
|
||||
Reference in new issue
Block a user