mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Merge pull request #2513 from FOCONIS/h2-backward-compat
Test against H2 1.4.199
This commit is contained in:
@@ -112,7 +112,7 @@ public class PlatformNoGeneratedKeysTest {
|
||||
config.setDdlRun(true);
|
||||
config.getClasses().add(EBasicVer.class);
|
||||
config.getClasses().add(BasicDraftableBean.class);
|
||||
|
||||
config.loadFromProperties(); // trigger auto config for H2 1.x
|
||||
|
||||
return DatabaseFactory.create(config);
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class TestSqlUpdateUpsert extends BaseTestCase {
|
||||
|
||||
private static boolean useV1Syntax = Boolean.getBoolean("ebean.h2.useV1Syntax");
|
||||
|
||||
@ForPlatform(Platform.H2)
|
||||
@Test
|
||||
public void h2Merge() throws InterruptedException {
|
||||
@@ -39,7 +41,11 @@ public class TestSqlUpdateUpsert extends BaseTestCase {
|
||||
.setParameter("online", false);
|
||||
|
||||
Object key2 = sqlUpdate2.executeGetKey();
|
||||
assertThat(key2).isEqualTo(key);
|
||||
if (useV1Syntax) {
|
||||
assertThat(key2).isNull();
|
||||
} else {
|
||||
assertThat(key2).isEqualTo(key);
|
||||
}
|
||||
|
||||
|
||||
EPersonOnline found2 = DB.find(EPersonOnline.class).where().eq("email", email).findOne();
|
||||
|
||||
Reference in New Issue
Block a user