In Unity, I’m using Realm to sync with my MongoDB database. When I try to filter the results using the following code:
var dbMatchgames = realm.All<DBMatchgame>().Where(i => i.PlayerIDs.Contains(MyApp.CurrentUser.Id));
realm.Subscriptions.Add(dbMatchgames, new SubscriptionOptions() { Name = "MyMatchgame" });
I get an error saying that the Contains
method is not supported. How can I avoid downloading all the documents in a collection?