mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#626 - ENH: Add support for where().idIn(...) using varargs
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user