Click or drag to resize

ChangeStreamDocumentTDocumentDisambiguatedPaths Property

Gets the disambiguated paths if present.

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver.Core (in MongoDB.Driver.Core.dll) Version: 2.19.1+3a2a09dd959482f665ffbb5df2557ec541597af4
Syntax
public BsonDocument DisambiguatedPaths { get; }

Property Value

Type: BsonDocument
The disambiguated paths.
Remarks

A document containing a map that associates an update path to an array containing the path components used in the update document. This data can be used in combination with the other fields in an UpdateDescription to determine the actual path in the document that was updated. This is necessary in cases where a key contains dot-separated strings (i.e. { "a.b": "c" }) or a document contains a numeric literal string key (i.e. { "a": { "0": "a" } }). Note that in this scenario, the numeric key can't be the top level key because { "0": "a" } is not ambiguous - update paths would simply be '0' which is unambiguous because BSON documents cannot have arrays at the top level. Each entry in the document maps an update path to an array which contains the actual path used when the document was updated. For example, given a document with the following shape { "a": { "0": 0 } } and an update of { $inc: { "a.0": 1 } }, DisambiguatedPaths would look like the following:

{
   "a.0": ["a", "0"]
}

In each array, all elements will be returned as strings with the exception of array indices, which will be returned as 32-bit integers.

Added in MongoDB version 6.1.0.

See Also