-
Type: Bug
-
Resolution: Gone away
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
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:
Unable to find source-code formatter for language: text. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
System.InvalidCastException: Unable to cast object of type 'MongoDB.Bson.BsonArray' to type 'MongoDB.Bson.BsonDocument'.
I think it is a bug.
- 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