I have two realms:
public class ChatRealm extends RealmObject {
private String id;
private RealmList<UserRealm> users;
}
public class UserRealm extends RealmObject {
private String id;
private String username;
}
I have an User id and I want to know which chats he is participating in. I have check the Realm documentation and couldn't find how to do this type of queries.
How can I get the results I want using a Realm query?
How about link query in documentation? There is an example:
RealmResults<ChatRealm> contacts = realm.where(ChatRealm.class).equalTo("users.id", "some id").findAll();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With