mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-14 06:45:21 +00:00
Update more tests for CockroachDB
This commit is contained in:
1 parent
d05dfae1d7
commit
b8b83c2ec8
4 files changed
+15
-11
No files matched your search
@@ -56,7 +56,7 @@ public class TestEncrypt extends BaseTestCase {
|
||||
assertThat(loggedSql.get(1)).contains("left join e_basicenc t1 on t1.id = t0.other_id");
|
||||
}
|
||||
|
||||
@IgnorePlatform({Platform.ORACLE, Platform.DB2})
|
||||
@IgnorePlatform({Platform.ORACLE, Platform.DB2, Platform.COCKROACH})
|
||||
@Test
|
||||
public void asDto() {
|
||||
DB.find(EBasicEncrypt.class).delete();
|
||||
|
||||
@@ -4,6 +4,7 @@ import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.Version;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Entity
|
||||
public class TEventMany {
|
||||
@@ -18,12 +19,12 @@ public class TEventMany {
|
||||
|
||||
int myUnits;
|
||||
|
||||
double amount;
|
||||
BigDecimal amount;
|
||||
|
||||
@Version
|
||||
Long version;
|
||||
|
||||
public TEventMany(String description, int myUnits, double amount) {
|
||||
public TEventMany(String description, int myUnits, BigDecimal amount) {
|
||||
this.description = description;
|
||||
this.myUnits = myUnits;
|
||||
this.amount = amount;
|
||||
@@ -61,11 +62,11 @@ public class TEventMany {
|
||||
this.myUnits = myUnits;
|
||||
}
|
||||
|
||||
public double getAmount() {
|
||||
public BigDecimal getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setAmount(double amount) {
|
||||
public void setAmount(BigDecimal amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@ package org.tests.query;
|
||||
import io.ebean.BaseTestCase;
|
||||
import io.ebean.DB;
|
||||
import io.ebean.Query;
|
||||
import io.ebean.annotation.IgnorePlatform;
|
||||
import io.ebean.annotation.Platform;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.tests.model.basic.CKeyParent;
|
||||
import org.tests.model.basic.ResetBasicData;
|
||||
@@ -37,6 +39,7 @@ public class TestQueryAlias extends BaseTestCase {
|
||||
assertThat(sql).contains("(myt0.one_key) in (select st0.one_key from ckey_parent st0)");
|
||||
}
|
||||
|
||||
@IgnorePlatform(Platform.COCKROACH)
|
||||
@Test
|
||||
public void testExistsWithConcat() {
|
||||
|
||||
|
||||
@@ -25,15 +25,15 @@ public class TestAggregationCount extends BaseTestCase {
|
||||
@BeforeAll
|
||||
public static void setup() {
|
||||
TEventOne one = new TEventOne("first", TEventOne.Status.AA);
|
||||
one.getLogs().add(new TEventMany("all", 1, 10));
|
||||
one.getLogs().add(new TEventMany("be", 2, 12.2));
|
||||
one.getLogs().add(new TEventMany("add", 3, 13));
|
||||
one.getLogs().add(new TEventMany("all", 1, BigDecimal.valueOf(10)));
|
||||
one.getLogs().add(new TEventMany("be", 2, BigDecimal.valueOf(12.2)));
|
||||
one.getLogs().add(new TEventMany("add", 3, BigDecimal.valueOf(13)));
|
||||
DB.save(one);
|
||||
|
||||
TEventOne two = new TEventOne("second", TEventOne.Status.AA);
|
||||
two.getLogs().add(new TEventMany("at", 10, 10));
|
||||
two.getLogs().add(new TEventMany("add", 30, 13));
|
||||
two.getLogs().add(new TEventMany("alf", 30, 13));
|
||||
two.getLogs().add(new TEventMany("at", 10, BigDecimal.valueOf(10)));
|
||||
two.getLogs().add(new TEventMany("add", 30, BigDecimal.valueOf(13)));
|
||||
two.getLogs().add(new TEventMany("alf", 30, BigDecimal.valueOf(13)));
|
||||
DB.save(two);
|
||||
|
||||
TEventOne three = new TEventOne("thrird", TEventOne.Status.BB);
|
||||
|
||||
Reference in new issue
Block a user