Details
-
New Feature
-
Resolution: Unresolved
-
Major - P3
-
None
-
2.7.0
-
None
-
All
-
Fully Compatible
Description
CursorBatchDeserializationHelper.DeserializeBatch creates a deserialization context that does not support documents with duplicate element names. This prevents the Find() method from being used to query collections with such documents. A fix is to change this line:
var context = BsonDeserializationContext.CreateRoot(reader);
to this line:
var context = BsonDeserializationContext.CreateRoot(reader, b => b.AllowDuplicateElementNames = true);