-
Type: New Feature
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
None
This ticket is related to the user's question in CSHARP-2908.
Currently, this projection logic:
var resultProject = collection .Aggregate() .Project( el => new { DividedPopulation = ((el.Population / 23)) }) .ToList();
will fail with FormatException, because we're trying to convert a double field from server response to int. We need to consider a convert top-level json node to the generated request, for example, to something like this (added `$toInt`):
{ $toInt : { $divide : [ ... ] } }
It's possible that this ticket will be implemented in the scope of LINQ redesign ticket CSHARP-2608
- is caused by
-
CSHARP-2908 System.FormatException. If result of $divide it is not integer value exception be thrown when Aggregate.Project are using
- Closed
- is duplicated by
-
CSHARP-3067 $convert (aggregation)
- Closed