-
Type: New Feature
-
Resolution: Won't Do
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.7.0
-
Component/s: Read Operations
-
None
-
Environment:All
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);