Reputation: 3086
I am having a scenario where i have an ArrayList of different ids. Now each id have more than one record in database, and the end result should be one list containing all the records of those ids. Is there any way i can combine them all in one RealmResult object?
I have two confusions here:
- When i try to initialize Realm result, i couldn't find its constructor. It says no default constructor found.
- AddAll method of RealmResult is deprecated.
Upvotes: 1
Views: 1594
Reputation: 81539
RealmResults<MyObj> results = realm.where(MyObj.class).in("id", arrayList.toArray()).findAll();
Upvotes: 3