diff --git a/ebean-core/src/test/java/io/ebeaninternal/server/expression/IsEmptyExpressionQueryTest.java b/ebean-core/src/test/java/io/ebeaninternal/server/expression/IsEmptyExpressionQueryTest.java index 45e9cb097..dba74742e 100644 --- a/ebean-core/src/test/java/io/ebeaninternal/server/expression/IsEmptyExpressionQueryTest.java +++ b/ebean-core/src/test/java/io/ebeaninternal/server/expression/IsEmptyExpressionQueryTest.java @@ -122,7 +122,7 @@ public class IsEmptyExpressionQueryTest extends BaseTestCase { query.findList(); if (isPostgres()) { - assertThat(sqlOf(query)).contains("select distinct on (t0.id) t0.id from o_customer t0 join contact u1 on u1.customer_id = t0.id where not exists (select 1 from contact_note x where x.contact_id = u1.id)"); + assertThat(sqlOf(query)).contains("select distinct on (t0.id) t0.id from o_customer t0 join contact u1 on u1.customer_id = t0.id where not exists (select 1 from contact_note x where x.contact_id = u1.id)"); } else { assertThat(sqlOf(query)).contains("select distinct t0.id from o_customer t0 join contact u1 on u1.customer_id = t0.id where not exists (select 1 from contact_note x where x.contact_id = u1.id)"); @@ -141,7 +141,7 @@ public class IsEmptyExpressionQueryTest extends BaseTestCase { query.findList(); if (isPostgres()) { - assertThat(sqlOf(query)).contains("select distinct on (t0.id) t0.id from o_customer t0 join contact u1 on u1.customer_id = t0.id where exists (select 1 from contact_note x where x.contact_id = u1.id)"); + assertThat(sqlOf(query)).contains("select distinct on (t0.id) t0.id from o_customer t0 join contact u1 on u1.customer_id = t0.id where exists (select 1 from contact_note x where x.contact_id = u1.id)"); } else { assertThat(sqlOf(query)).contains("select distinct t0.id from o_customer t0 join contact u1 on u1.customer_id = t0.id where exists (select 1 from contact_note x where x.contact_id = u1.id)"); diff --git a/ebean-core/src/test/java/org/tests/query/TestImplicitJoinOnParentRelationship.java b/ebean-core/src/test/java/org/tests/query/TestImplicitJoinOnParentRelationship.java index 5c8abcdeb..c4aa242eb 100644 --- a/ebean-core/src/test/java/org/tests/query/TestImplicitJoinOnParentRelationship.java +++ b/ebean-core/src/test/java/org/tests/query/TestImplicitJoinOnParentRelationship.java @@ -24,7 +24,7 @@ public class TestImplicitJoinOnParentRelationship extends BaseTestCase { query.findList(); if (isPostgres()) { - String expectedSql = "select distinct on (t0.id) t0.id, t0.name from o_customer t0 join o_order u1 on u1.kcustomer_id = t0.id join o_order_detail u2 on u2.order_id = u1.id join o_product u3 on u3.id = u2.product_id where u3.name = ?"; + String expectedSql = "select distinct on (t0.id) t0.id, t0.name from o_customer t0 join o_order u1 on u1.kcustomer_id = t0.id join o_order_detail u2 on u2.order_id = u1.id join o_product u3 on u3.id = u2.product_id where u3.name = ?"; assertThat(sqlOf(query, 1)).contains(expectedSql); } else { @@ -55,7 +55,7 @@ public class TestImplicitJoinOnParentRelationship extends BaseTestCase { query.findList(); if (isPostgres()) { - String expectedSql = "select distinct on (t0.id) t0.id, t0.name from o_customer t0 left join o_order u1 on u1.kcustomer_id = t0.id left join o_order_detail u2 on u2.order_id = u1.id left join o_product u3 on u3.id = u2.product_id where (u3.name = ? or t0.id = ?)"; + String expectedSql = "select distinct on (t0.id) t0.id, t0.name from o_customer t0 left join o_order u1 on u1.kcustomer_id = t0.id left join o_order_detail u2 on u2.order_id = u1.id left join o_product u3 on u3.id = u2.product_id where (u3.name = ? or t0.id = ?)"; assertThat(sqlOf(query, 1)).contains(expectedSql); } else { String expectedSql = "select distinct t0.id, t0.name from o_customer t0 left join o_order u1 on u1.kcustomer_id = t0.id left join o_order_detail u2 on u2.order_id = u1.id left join o_product u3 on u3.id = u2.product_id where (u3.name = ? or t0.id = ?)"; @@ -76,7 +76,7 @@ public class TestImplicitJoinOnParentRelationship extends BaseTestCase { query.findList(); if (isPostgres()) { - String expectedSql = "select distinct on (t0.id) t0.id, t0.name from o_customer t0 left join o_order u1 on u1.kcustomer_id = t0.id left join o_order_detail u2 on u2.order_id = u1.id left join o_product u3 on u3.id = u2.product_id where (u3.name = ? or t0.id = ?)"; + String expectedSql = "select distinct on (t0.id) t0.id, t0.name from o_customer t0 left join o_order u1 on u1.kcustomer_id = t0.id left join o_order_detail u2 on u2.order_id = u1.id left join o_product u3 on u3.id = u2.product_id where (u3.name = ? or t0.id = ?)"; assertThat(sqlOf(query, 1)).contains(expectedSql); } else {