I would like to add some light to the "request",
There is a limitation in this, we cannot pass more than 100 identifiers inside the request
So what I did to achieve this goal:
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 identifiers used in Query, we can use this method.
source share