I have realm object Item with linked collection Properties:
public class Item : RealmObject
{
public IList<Property> Properties { get; }
public int Id {get; set;}
....
}
public class Property : RealmObject
{
public string Key {get; set;}
public string Value {get; set;}
}
And I need to sort to Item entities by properties from linked Properties collection. Something like this (I know it's not supported by Realm):
Realm.All<Item>().OrderBy(f => f.Properties.FirstOrDefault( p => p.Key == "Status").Value)
It is not possible to move properties to Item entity cause different items can contain different properties set which also may change over time. Is there other options to implement this kind of sorting? For now I see only option to sort objects in memory, but it may take too much memory on big dataset.