#1552 - Remove deprecated methods on Transaction setBatch(PersistBatch) .. migrate to setBatchMode(boolean)

This commit is contained in:
rob bygrave
2018-11-19 23:36:15 +13:00
parent 6bc72ae6bb
commit 83776a1eae
18 changed files with 51 additions and 179 deletions
@@ -29,8 +29,8 @@ public class TestBatchInsertSimple extends BaseTestCase {
Transaction transaction = Ebean.beginTransaction();
try {
transaction.setBatch(PersistBatch.NONE);
transaction.setBatchOnCascade(PersistBatch.ALL);
transaction.setBatchMode(false);
transaction.setBatchOnCascade(true);
transaction.setBatchSize(30);
// setBatchGetGeneratedKeys MUST be turned off for MS SQL Server because :(
transaction.setBatchGetGeneratedKeys(false);
@@ -103,8 +103,8 @@ public class TestBatchInsertSimple extends BaseTestCase {
Transaction transaction = Ebean.beginTransaction();
try {
transaction.setBatch(PersistBatch.NONE);
transaction.setBatchOnCascade(PersistBatch.ALL);
transaction.setBatchMode(false);
transaction.setBatchOnCascade(true);
transaction.setBatchSize(30);
// setBatchGetGeneratedKeys MUST be turned off for MS SQL Server because :(
transaction.setBatchGetGeneratedKeys(false);
@@ -133,8 +133,8 @@ public class TestBatchInsertSimple extends BaseTestCase {
Transaction transaction = Ebean.beginTransaction();
try {
transaction.setBatch(PersistBatch.NONE);
transaction.setBatchOnCascade(spiEbeanServer().getDatabasePlatform().getPersistBatchOnCascade());
transaction.setBatchMode(true);
transaction.setBatchOnCascade(PersistBatch.ALL.equals(spiEbeanServer().getDatabasePlatform().getPersistBatchOnCascade()));
transaction.setBatchSize(20);
// escalate based on batchOnCascade value