Add SAP HANA support (#1511)

This commit is contained in:
Jonathan Bregler
2018-10-24 21:38:17 +13:00
committed by Rob Bygrave
parent b1410cc660
commit 158ee9a081
79 changed files with 2596 additions and 215 deletions
@@ -3,7 +3,9 @@ package org.tests.batchinsert;
import io.ebean.BaseTestCase;
import io.ebean.EbeanServer;
import io.ebean.Transaction;
import io.ebean.annotation.IgnorePlatform;
import io.ebean.annotation.PersistBatch;
import io.ebean.annotation.Platform;
import io.ebeaninternal.api.SpiTransaction;
import io.ebeaninternal.server.persist.BatchControl;
import org.tests.model.basic.EBasicWithUniqueCon;
@@ -20,6 +22,7 @@ import static org.assertj.core.api.Assertions.assertThat;
public class TestBatchOnCascadeExceptionHandling extends BaseTestCase {
@IgnorePlatform(Platform.HANA)
@Test
public void testBatchScenarioWithSavepoint() throws SQLException {
server().save(createEntityWithName("conflict", "before"));
@@ -84,7 +87,7 @@ public class TestBatchOnCascadeExceptionHandling extends BaseTestCase {
Transaction txn = server.beginTransaction();
try {
assertThat(txn.getBatch()).isSameAs(PersistBatch.NONE);
assertThat(txn.getBatchOnCascade()).isSameAs(PersistBatch.ALL);
assertThat(txn.getBatchOnCascade()).isSameAs(spiEbeanServer().getDatabasePlatform().getPersistBatchOnCascade());
failingOperation.run();
Assertions.fail("PersistenceException expected");