Ezio123 Ezio123 - 4 months ago 21
Android Question

How to convert RealmResults object to RealmList?

I have a

RealmResults <Student>
object. I want to convert it to
RealmList <Student>
object. any suggestions?

Answer
RealmList <Student> results = new RealmList<Student>();

for(Student student : realResultsList){
   results.add(student);
}

However, this is not the most elegant way to do the conversion.