#1189 - ExpressionList.isNull and SoftDelete

This commit is contained in:
rob bygrave
2017-11-01 21:26:15 +13:00
parent e75670f207
commit 0dbba7a211
7 changed files with 47 additions and 25 deletions
@@ -30,7 +30,7 @@ public class TestQueryIsNull extends BaseTestCase {
Query<Order> query = Ebean.find(Order.class).where().isNotNull("details").query();
query.findList();
assertTrue(query.getGeneratedSql().contains(" where exists (select 1 from o_order_detail where order_id = t0.id)"));
assertTrue(query.getGeneratedSql().contains(" where exists (select 1 from o_order_detail x where x.order_id = t0.id)"));
}
@Test
@@ -40,7 +40,7 @@ public class TestQueryIsNull extends BaseTestCase {
Query<Order> query = Ebean.find(Order.class).where().isNotEmpty("details").query();
query.findList();
assertTrue(query.getGeneratedSql().contains(" where exists (select 1 from o_order_detail where order_id = t0.id)"));
assertTrue(query.getGeneratedSql().contains(" where exists (select 1 from o_order_detail x where x.order_id = t0.id)"));
}
@Test
@@ -50,7 +50,7 @@ public class TestQueryIsNull extends BaseTestCase {
Query<Order> query = Ebean.find(Order.class).where().isNull("details").query();
query.findList();
assertTrue(query.getGeneratedSql().contains(" where not exists (select 1 from o_order_detail where order_id = t0.id)"));
assertTrue(query.getGeneratedSql().contains(" where not exists (select 1 from o_order_detail x where x.order_id = t0.id)"));
}
@Test
@@ -60,7 +60,7 @@ public class TestQueryIsNull extends BaseTestCase {
Query<Order> query = Ebean.find(Order.class).where().isEmpty("details").query();
query.findList();
assertTrue(query.getGeneratedSql().contains(" where not exists (select 1 from o_order_detail where order_id = t0.id)"));
assertTrue(query.getGeneratedSql().contains(" where not exists (select 1 from o_order_detail x where x.order_id = t0.id)"));
}
@Test
@@ -70,7 +70,7 @@ public class TestQueryIsNull extends BaseTestCase {
Query<Role> query = Ebean.find(Role.class).where().isEmpty("permissions").query();
query.findList();
assertTrue(query.getGeneratedSql().contains("from mt_role t0 where not exists (select 1 from mt_role_permission where mt_role_id = t0.id)"));
assertTrue(query.getGeneratedSql().contains("from mt_role t0 where not exists (select 1 from mt_role_permission x where x.mt_role_id = t0.id)"));
}
@Test
@@ -80,7 +80,7 @@ public class TestQueryIsNull extends BaseTestCase {
Query<Role> query = Ebean.find(Role.class).where().isNull("permissions").query();
query.findList();
assertTrue(query.getGeneratedSql().contains("from mt_role t0 where not exists (select 1 from mt_role_permission where mt_role_id = t0.id)"));
assertTrue(query.getGeneratedSql().contains("from mt_role t0 where not exists (select 1 from mt_role_permission x where x.mt_role_id = t0.id)"));
}
@Test
@@ -90,7 +90,7 @@ public class TestQueryIsNull extends BaseTestCase {
Query<Role> query = Ebean.find(Role.class).where().isNotEmpty("permissions").query();
query.findList();
assertTrue(query.getGeneratedSql().contains("from mt_role t0 where exists (select 1 from mt_role_permission where mt_role_id = t0.id)"));
assertTrue(query.getGeneratedSql().contains("from mt_role t0 where exists (select 1 from mt_role_permission x where x.mt_role_id = t0.id)"));
}
@Test
@@ -100,7 +100,7 @@ public class TestQueryIsNull extends BaseTestCase {
Query<Role> query = Ebean.find(Role.class).where().isNotNull("permissions").query();
query.findList();
assertTrue(query.getGeneratedSql().contains("from mt_role t0 where exists (select 1 from mt_role_permission where mt_role_id = t0.id)"));
assertTrue(query.getGeneratedSql().contains("from mt_role t0 where exists (select 1 from mt_role_permission x where x.mt_role_id = t0.id)"));
}
}