我有一个查询,我的自定义对象是这样形成的:
Path path = paths.get(i);
RealmList<RealmInt> ids = path.getPlaces();
query = realm.where(Place.class);
if(ids.size()==0){
} else {
int j = 0;
for (RealmInt id:ids){
if(j++>0){
query = query.or();
}
query = query.equalTo("id",id.getVal());
}
}
来自StackOverflow的一些帖子。现在,我想将.contains添加到该查询但它似乎不起作用,它返回像.contains不存在的项目。有什么想法吗?
答案 0 :(得分:0)
我找到了一个解决方案,关键是使用beginGroup()和endGroup()