代码
public class Chat extends RealmObject {
private RealmList<Contact> contactsList;
}
public class Contact extends RealmObject {
private PhoneNumber phoneNumber;
}
public class PhoneNumber extends RealmObject {
private String number;
}
String tArray[] = new String[]{"234234","234423432","23432423"};
RealmQuery<Chat> realmQuery = realm.where(Chat.class).in("contactsList.phoneNumber.number",tArray);
RealmResults<Chat> chatList = realmQuery.findAll();
此查询返回所有对象,而不是数组中指定的对象。为什么呢?