Details
-
Bug
-
Resolution: Gone away
-
Minor - P4
-
None
-
None
-
None
-
None
Description
This code
new PipelineUpdateDefinition<MyDocument>( |
new EmptyPipelineDefinition<MyDocument>() |
.Match(a => a.MyObject == null)) |
.Set(a => a.MyObject, new MyDocument.MyObject()) |
.Render(
|
BsonSerializer.SerializerRegistry.GetSerializer<MyDocument>(),
|
BsonSerializer.SerializerRegistry
|
).ToBsonDocument();
|
Gives me this error:
System.InvalidCastException:
|
Unable to cast object of type 'MongoDB.Bson.BsonArray' to type 'MongoDB.Bson.BsonDocument'.
|
I think it is a bug.
Attachments
Issue Links
- is related to
-
CSHARP-4746 PipelineUpdateDefinition cannot be combined with any other update definition
-
- Closed
-
-
CSHARP-4747 Add support for $set stage
-
- Closed
-
- related to
-
CSHARP-4293 Update with aggregation pipeline fails when used on a OfTypeMongoCollection (OfType<T>)
-
- Closed
-