#626 - ENH: Add support for where().idIn(...) using varargs

This commit is contained in:
Robin Bygrave
2016-03-29 16:10:00 +13:00
parent 04965892f0
commit 32f4a56ab4
6 changed files with 39 additions and 16 deletions
@@ -1,15 +1,14 @@
package com.avaje.tests.query;
import java.util.ArrayList;
import java.util.List;
import org.junit.Assert;
import org.junit.Test;
import com.avaje.ebean.BaseTestCase;
import com.avaje.ebean.Ebean;
import com.avaje.tests.model.basic.Customer;
import com.avaje.tests.model.basic.ResetBasicData;
import org.junit.Test;
import java.util.List;
import static org.junit.Assert.assertNotNull;
public class TestQueryInIdTypeConversion extends BaseTestCase {
@@ -18,13 +17,8 @@ public class TestQueryInIdTypeConversion extends BaseTestCase {
ResetBasicData.reset();
List<String> idList = new ArrayList<String>();
idList.add("1");
idList.add("2");
List<Customer> list = Ebean.find(Customer.class).where().idIn(idList).findList();
Assert.assertNotNull(list);
List<Customer> list = Ebean.find(Customer.class).where().idIn("1", "2").findList();
assertNotNull(list);
}
}