realm / realm-object-server

Tracking of issues related to the Realm Object Server and other general issues not related to the specific SDK's
https://realm.io
293 stars 42 forks source link

Use BacklinksCount in queries #307

Closed nielsenko closed 6 years ago

nielsenko commented 6 years ago

Goals

This is a feature request to be able to use BacklinksCount in queries. Currently the query engine complains it is not a directly persisted property.

Expected Results

Allow construction such as:

realm.RemoveRange(self.All<T>().Where(i => i.BacklinksCount == 0));

Actual Results

Today I need to do:

var die = realm.All<T>().AsEnumerable().Where(i => i.BacklinksCount == 0).ToList(); foreach (var item in die) realm.Remove(item);

Which rubs me the wrong way

Version of Realm and Tooling

Any version after Realm-2.0.0, but I'm using Realm-2.1.0-alpha-345

nirinchev commented 6 years ago

Issue moved to realm/realm-dotnet #1646 via ZenHub

Moved to the .NET repo as this is a LINQ issue, not something that relates to ROS.

nielsenko commented 6 years ago

Ups, sorry for posting under ROS