-
Type:
Bug
-
Resolution: Gone away
-
Priority:
Unknown
-
None
-
Affects Version/s: 3.0.0
-
Component/s: None
-
None
-
None
-
Dotnet Drivers
-
None
-
None
-
None
-
None
-
None
-
None
Summary
Mongodb Driver c# 3.x,when aggregate with Builders<BsonDocument>.Projection.Expression, the final pipeline will add $literal operator, which not in 2.28.0.
Please provide the version of the driver. If applicable, please provide the MongoDB server version and topology (standalone, replica set, or sharded cluster).
How to Reproduce
- Create a Projection
var projection = Builders<BsonDocument>.Projection.Expression(document => new
{
Number = new BsonDocument("$toDouble", new BsonDocument "$substr", new BsonArray {$"${numberFiled}", prefix.Length, -1}),
Id = document["_id"]
}); - Aggregate with it
dbSet.Aggregate().Project(projection)
Additional Background
Please provide any additional background information that may be helpful in diagnosing the bug.