-
Type:
Bug
-
Resolution: Works as Designed
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
ALL
-
-
Query 2020-11-30
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
I am using the Realm Go backend (with cgo) to call stitch_support_v1_update_create with an arrayFilters option but I keep see the following error every time:
{No array filter found for identifier 'element' in path 'grades.$[element]'}]}
I have a collection with a single document as such:
{ "_id" : 1, "grades" : [ 95, 92, 190 ] }
and am trying to run the following operation:
collection.updateOne( { }, { $set: { "grades.$[element]" : 100 } }, { arrayFilters: [ { "element": 190 } ] })
Operations without an arrayFilter work property but I also get the correct error when I pass in multiple array filters with the correct name e.g.
collection.updateOne( { }, { $set: { "grades.$[element]" : 100 } }, { arrayFilters: [ { "element": 190 }, { "element": 180 } ] })
gives:
Found multiple array filters with the same top-level field name element
The arrayFilter bytes sent to stitch_support_v1_update_create seem to be correct, and the filters seem to get parsed correctly, but something appears to be off when the update tries to find the appropriate filter