Ajji Ajji - 10 months ago 67
Android Question

Empty RealmResult Object

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:

  1. When i try to initialize Realm result, i couldn't find its constructor. It says no default constructor found.

  2. AddAll method of RealmResult is deprecated.

Answer Source
RealmResults<MyObj> results = realm.where(MyObj.class).in("id", arrayList.toArray()).findAll();