-
Type: Bug
-
Resolution: Won't Do
-
Priority: Major - P3
-
None
-
Affects Version/s: 5.0.15
-
Component/s: None
-
None
-
Query Execution
-
ALL
-
-
QE 2023-09-18
I expected to have a consistent return element inside the `updatedFields` when working with the watch and updateOne + $push functionality.
When performing a coll.Watch and then a $push on an array inside the document,
the first watch-stream returns an array in the updatedFields,
the second watch-stream returns an object.
What to expect
updatedFields: { 'scores.0': 1 },
What is actually returns
updatedFields: { scores: [ 1 ] },
Sidenotes:
I made sure that scores is an empty array.
I'm working with Free Mongo Cloud, in case it is important my cluster:
typing-competition-cluster 5f562f47523b020a2093688e
For JS this wouldn't be that of a problem, but with strictly typed languages like GOLang this is annoying to work around.