-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.5
-
Component/s: Operations
-
None
-
Environment:Issue related to driver only
When a filter is created with the FilterDefinitionBuilder for a decimal value then the resulting BsonDocument for the filter is constructed in the wrong way:
var mongoClient = new MongoClient(); var db = mongoClient.GetDatabase("db1"); var collection = db.GetCollection<BsonDocument>("c1"); decimal val = 99999421999.002M; var b = new FilterDefinitionBuilder<BsonDocument>(); var filter = b.Eq("f1", val); var bsonDocFiler = filter.Render(collection.DocumentSerializer, collection.Settings.SerializerRegistry); Console.WriteLine(bsonDocFiler["f1"].BsonType);
- is related to
-
CSHARP-2210 System.Decimal is serialized as a string by default
- Closed