diff --git a/ebean-core/src/main/java/io/ebeaninternal/server/expression/DefaultExpressionRequest.java b/ebean-core/src/main/java/io/ebeaninternal/server/expression/DefaultExpressionRequest.java index 732640a61c..3170dbee2a 100644 --- a/ebean-core/src/main/java/io/ebeaninternal/server/expression/DefaultExpressionRequest.java +++ b/ebean-core/src/main/java/io/ebeaninternal/server/expression/DefaultExpressionRequest.java @@ -84,7 +84,6 @@ public String parseDeploy(String logicalProp) { public void appendLike(boolean rawLikeExpression) { sql.append(" "); sql.append(queryRequest.dbLikeClause(rawLikeExpression)); - sql.append(" "); } @Override diff --git a/ebean-test/src/test/java/io/ebean/xtest/internal/server/grammer/EqlParserTest.java b/ebean-test/src/test/java/io/ebean/xtest/internal/server/grammer/EqlParserTest.java index 73128d9085..8053cefc1b 100644 --- a/ebean-test/src/test/java/io/ebean/xtest/internal/server/grammer/EqlParserTest.java +++ b/ebean-test/src/test/java/io/ebean/xtest/internal/server/grammer/EqlParserTest.java @@ -748,7 +748,7 @@ void where_withParams() { final Query query = where("id isNotNull and name = ? and smallnote istartsWith ?", "Rob", "Foo"); query.findList(); if (isH2()) { - assertSql(query).contains("where (t0.id is not null and t0.name = ? and lower(t0.smallnote) like ? escape'|' )"); + assertSql(query).contains("where (t0.id is not null and t0.name = ? and lower(t0.smallnote) like ? escape'|')"); } } @@ -757,7 +757,7 @@ void where_withParamsQuPos() { final Query query = where("name = ?1 and smallnote istartsWith ?2 and name like ?1", "Rob", "Foo"); query.findList(); if (isH2()) { - assertSql(query).contains(" where (t0.name = ? and lower(t0.smallnote) like ? escape'|' and t0.name like ? escape'' )"); + assertSql(query).contains(" where (t0.name = ? and lower(t0.smallnote) like ? escape'|' and t0.name like ? escape'')"); } } @@ -775,7 +775,7 @@ void where_orWithParams() { final Query query = where("(id isNotNull or name = ?) and smallnote istartsWith ?", "Rob", "Foo"); query.findList(); if (isH2()) { - assertSql(query).contains("where ((t0.id is not null or t0.name = ?) and lower(t0.smallnote) like ? escape'|' )"); + assertSql(query).contains("where ((t0.id is not null or t0.name = ?) and lower(t0.smallnote) like ? escape'|')"); } } diff --git a/ebean-test/src/test/java/org/tests/model/history/TestHistoryOneToMany.java b/ebean-test/src/test/java/org/tests/model/history/TestHistoryOneToMany.java index 7278d8cf44..bf3eba8a0a 100644 --- a/ebean-test/src/test/java/org/tests/model/history/TestHistoryOneToMany.java +++ b/ebean-test/src/test/java/org/tests/model/history/TestHistoryOneToMany.java @@ -58,7 +58,7 @@ public void test() throws InterruptedException { if (isH2()) { assertThat(sql).hasSize(2); - assertSql(sql.get(0)).contains("from hi_tone_with_history t0 where (t0.sys_period_start <= ? and (t0.sys_period_end is null or t0.sys_period_end > ?)) and lower(t0.name) like ? escape'' limit 10"); + assertSql(sql.get(0)).contains("from hi_tone_with_history t0 where (t0.sys_period_start <= ? and (t0.sys_period_end is null or t0.sys_period_end > ?)) and lower(t0.name) like ? escape'' limit 10"); assertSql(sql.get(1)).contains("from hi_ttwo_with_history t0 left join hi_tthree_with_history t1 on t1.hi_ttwo_id = t0.id and (t1.sys_period_start <= ? and (t1.sys_period_end is null or t1.sys_period_end > ?)) where (t0.sys_period_start <= ? and (t0.sys_period_end is null or t0.sys_period_end > ?)) and (t0.hi_tone_id) in (?)"); } } diff --git a/ebean-test/src/test/java/org/tests/query/TestQueryFilterMany.java b/ebean-test/src/test/java/org/tests/query/TestQueryFilterMany.java index ebc02064d3..75d158c882 100644 --- a/ebean-test/src/test/java/org/tests/query/TestQueryFilterMany.java +++ b/ebean-test/src/test/java/org/tests/query/TestQueryFilterMany.java @@ -305,7 +305,7 @@ public void testFilterManyUsingExpression() { if (isSqlServer()) { assertSql(sql.get(0)).contains(" from o_customer t0 left join contact t1 on t1.customer_id = t0.id where (t1.first_name is not null and lower(t1.email) like ? ) order by t0.id; --bind(rob%)"); } else { - assertSql(sql.get(0)).contains(" from o_customer t0 left join contact t1 on t1.customer_id = t0.id where (t1.first_name is not null and lower(t1.email) like ? escape'|' ) order by t0.id; --bind(rob%)"); + assertSql(sql.get(0)).contains(" from o_customer t0 left join contact t1 on t1.customer_id = t0.id where (t1.first_name is not null and lower(t1.email) like ? escape'|') order by t0.id; --bind(rob%)"); } } } diff --git a/ebean-test/src/test/java/org/tests/query/finder/TestCustomerFinder.java b/ebean-test/src/test/java/org/tests/query/finder/TestCustomerFinder.java index 5da4bac4e7..c7bc9d5ca7 100644 --- a/ebean-test/src/test/java/org/tests/query/finder/TestCustomerFinder.java +++ b/ebean-test/src/test/java/org/tests/query/finder/TestCustomerFinder.java @@ -241,7 +241,7 @@ public void test_metricsAsJson_withAll() { assertThat(metricsJson).contains("\"name\":\"orm.Customer.findList\""); assertThat(metricsJson).contains("\"loc\":\"org.tests.model.basic.finder.CustomerFinder.byNameStatus\""); if (isH2() || isPostgresCompatible()) { - assertThat(metricsJson).contains("\"hash\":\"de3affa5b4bff07e19c1c012590dcde6\""); + assertThat(metricsJson).contains("\"hash\":\"25c7fe502c5a20ebe5b13db21e70e6a9\""); assertThat(metricsJson).contains("\"sql\":\"select t0.id, t0.status,"); } }