filteredPosts的记录具有类别3,5
,但在 in 查询中,其大小始终为零public class Post extends RealmObject{
@PrimaryKey
private long id;
private String title;
private RealmList<Integer> categories;
}
realm = Realm.getDefaultInstance();
realm.beginTransaction();
Integer cates[] = {3,5};
RealmResults<Post> filteredPosts =
realm.where(Post.class).in("categories",cates).findAll();
realm.commitTransaction();
Log.e(TAG,filteredPosts.size()+"");