I\'m building an Android app with the Realm database.
I have a RealmObject
subclass called Article
which has an id
field (it\'s an
This is the way Realm does it since 1.2.0:
public RealmQuery in(String fieldName, String[] values) {
if (values == null || values.length == 0) {
throw new IllegalArgumentException(EMPTY_VALUES);
}
beginGroup().equalTo(fieldName, values[0]);
for (int i = 1; i < values.length; i++) {
or().equalTo(fieldName, values[i]);
}
return endGroup();
}
Previously this is how I did it