Reputation: 6616
Check out following classes:
class Person{
int id;
String name;
RealmList<Mail> mails;
...
}
class Mail{
int id;
String content;
...
}
I have a Person
object (ie: mPerson
) and I am accessing all Mail
s of the Person
object by mPerson.getMails()
. Till here everything is cool.
Here is the question: Is there way to query over the returned list such as findAllSortedAsync()
?
Upvotes: 3
Views: 13785
Reputation: 8186
RealmResults<Contact> contacts = mRealm.where(Contact.class).findAll();
int size = contacts.size();
for (int i = 0;i<size;i++){
Contact contact = contacts.get(i);
RealmList<EMail> eMails = contact.emails;
}
Upvotes: 0