Can nested objects be queried in Realm using Xamarin?

When accessing a nested object with the code below, the following exception appears:

System.NotSupportedException: The left side of the Equal statement must be direct access to the persisted property in the Realm.

However, in Objective C it seems like you can query nested objects somehow. Are there any plans or solutions to query nested objects in xamarin?

Realm.All<Person>().Where(p => p.Name.Firstname == "Test");

public class Person : RealmObject
{
    public string Town { get; set; }
    public PersonName Name { get; set; }
}

public class PersonName : RealmObject
{
    public string Firstname { get; set; }
    public string Lastname { get; set; }
}

      

+3


source to share


1 answer


This is a planned feature. You can track the issue on GitHub .



0


source







All Articles