|
The manual says:
"To specify or access an element of an array by the zero-based index position, concatenate the array name with the dot (.) and zero-based index position, and enclose in quotes"
However, with the C-Driver, at least, one can create arrays whose element keys are not "0", "1", "2",... and this will not work unless you specified those particular values for the keys when you "bson_append" elements to the array in a document you are preparing to insert. If this is by design, then the documentation should be fixed, and should include what rules are used by the server to generate element keys when existing arrays are modified. Otherwise, the server should be fixed to ignore the element keys included in submitted bson arrays, and just normalize to "0","1", "2",... according to position.
|