Using realm, what is the correct way to filter based on a models sub field? I have a model that as a property that is a list of ObjectId and i want to filter models based on them having a particular id This is what i have but i get an error RealmException: Unsupported comparison operator 'contains' against type 'objectId', right side must be a string or binary type. Error code: 1009.
final query = realm.query<realm_models.Bookmark>(
r'collections CONTAINS $0', [ObjectId.fromHexString(id)]);