#1170 - ENH: Add isIn() methods as alias to in() on ExpressionList (for use with Kotlin where in is a keyword)

This commit is contained in:
Rob Bygrave
2017-10-16 23:13:49 +13:00
parent 96a4b93c75
commit 1005f177fd
4 changed files with 75 additions and 2 deletions
@@ -24,6 +24,17 @@ public class TestInEmpty extends BaseTestCase {
assertEquals(0, list.size());
}
@Test
public void test_isIn_empty() {
Query<Order> query = Ebean.find(Order.class).where().isIn("id", new Object[0]).gt("id", 0)
.query();
List<Order> list = query.findList();
assertThat(query.getGeneratedSql()).contains("1=0");
assertEquals(0, list.size());
}
@Test
public void test_notIn_empty() {