I have the following RealmObject:
public class City extends RealmObject { private String cityId; private RealmList<Street> streets; public String getId() { return cityId; } public void setCityId(String cityId) { this.cityId = cityId; } public RealmList<Street> getStreets() { return streets; } public void setStreets(RealmList<Street> streets) { this.streets = streets; } }
Now that I have a city, I need to query the streets of a specific city. How to do it? I tried:
Realm.getInstance(context).where(City.class).equalTo("cityId", someCityId, false) .findFirst().getStreets().where().findAll()
But this leads to an Exception. I need to display the streets in the ListView filtering implementation, so I need the streets to be RealmResults to use the RealmBaseAdapter<Street> .
source share