Realm how to make a query for items that have the size of an array bigger than 0?

Viewed 1066

I checked the documentation, and I know how to access objects from within objects, like:

RealmResults<User> r1 = realm.where(User.class)
                         .equalTo("dogs.name", "Fluffy")
                         .equalTo("dogs.color", "Brown")
                         .findAll();

But if I have in my User.class a realmlist: dogs, how can I check if it has items?

RealmResults<User> r1 = realm.where(User.class)
                         .equalTo("dogs.size", 0)
                         .findAll();
1 Answers
Related