I'm trying to make a query in realm. I have an array with the id that I want and I get this error:
java.lang.UnsupportedOperationException: Missing right-hand side of OR
When I make the RealmQuery match to RealmResult, I make this match since I need RealmResult for the adapter constructor.
I leave the code:
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¡¡¡
}