-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.4.3
-
Component/s: Linq
Given the following simple documents and UpdateDefinition:
class Thing { public int Value { get; set; } public IList<SubThing> SubThings { get; set; } } class SubThing { public int SubValue { get; set; } } var ud = new UpdateDefinitionBuilder<Thing>().Set(o => o.Value, 1) .Set(o => o.SubThings[0].SubValue, 0) .Set(o => o.SubThings[1].SubValue, 1);
I get the following incorrect BSON:
{ "$set" :
}
I'm expecting:
{ "$set" : { "Value" : 1, "SubThings.0.SubValue" : 0, "SubThings.1.SubValue" : 1 }}
This only seems to occur when using a lambda field selector.