Estoy intentando hacer una consulta en realm. Tengo un array con los id que quiero y me da este error:
java.lang.UnsupportedOperationException: Missing right-hand side of OR
cuando hago la iguacion de RealmQuery a RealmResult, hago este igualacion ya que necesito RealmResult para el constructor del adapter.
Os dejo el codigo:
private RealmQuery<Clothes> query;
private RealmResults<Clothes> clothes = null;
query = realm.where(Clothes.class);
if(listClothesIDString != null) {
String[] partsID = listClothesIDString.split("-");
Integer[] partsIDInt = new Integer[partsID.length];
for (int i = 0; i < partsID.length; i++) {
partsIDInt[i] = Integer.parseInt(partsID[i]);
}
for (Integer id : partsIDInt) {
query = query.or().equalTo("id", id);
}
clothes = query.findAll(); // Aqui da el error¡¡¡
}