Skip to content

Commit d6beda0

Browse files
committed
Fix tests for Postgres, Oracle, Sql Server
1 parent 6b57169 commit d6beda0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ebean-test/src/test/java/org/tests/model/basic/Building.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public class Building extends Model {
1313
public int id;
1414
@Column(nullable = false)
1515
public String type;
16+
@Column(name = "lvl")
1617
public int level;
1718
public final String name;
1819
@ManyToOne(optional = false)

ebean-test/src/test/java/org/tests/query/TestQueryFilterMany.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,6 @@ public void test_filterMany_copy_findList() {
339339

340340
List<String> sqlList = LoggedSql.stop();
341341
assertEquals(1, sqlList.size());
342-
assertThat(sqlList.get(0)).contains("left join o_order t1 on t1.kcustomer_id = t0.id and t1.order_date is not null left join o_customer t2 on t2.id = t1.kcustomer_id and t1.status in (?) order by t0.id");
343342
if (isPostgresCompatible()) {
344343
assertThat(sqlList.get(0)).contains("left join o_customer t2 on t2.id = t1.kcustomer_id and t1.status = any(?) order by t0.id");
345344
} else {
@@ -441,7 +440,7 @@ public void testFilterManyUsingExpression() {
441440

442441
assertThat(sql).hasSize(1);
443442
if (isSqlServer()) {
444-
assertSql(sql.get(0)).contains(" from o_customer t0 left join contact t1 on t1.customer_id = t0.id and (t1.first_name is not null and lower(t1.email) like ? order by t0.id; --bind(rob%)");
443+
assertSql(sql.get(0)).contains(" from o_customer t0 left join contact t1 on t1.customer_id = t0.id and (t1.first_name is not null and lower(t1.email) like ?) order by t0.id; --bind(rob%)");
445444
} else {
446445
assertSql(sql.get(0)).contains(" from o_customer t0 left join contact t1 on t1.customer_id = t0.id and (t1.first_name is not null and lower(t1.email) like ? escape'|') order by t0.id; --bind(rob%)");
447446
}

0 commit comments

Comments
 (0)