I would like to put some light in "in query",
There is a limitation in this, we cant pass more than 100 ids inside a in query
So what I did to achieve this is:
List<Product> productList = new ArrayList<Product>();
DaoSession daoSessionUni = TarneaAndroidApplicationContext.getInstance().getDaoSession();
for (int i = 0; i < rowIds.size(); i = i + 100)
{
ProductDao productDao = daoSessionUni.getProductDao();
QueryBuilder<Product> queryBuilder = productDao.queryBuilder().where(
ProductDao.Properties.Id.in(rowIds.subList(i + 100 < rowIds.size() ?
i + 100 :
rowIds.size())),
ProductDao.Properties.IsDeleted.eq(0));
productList.addAll(queryBuilder.list());
}
if we want to pass a list of id using in Query we can use this method.