-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
None
-
Affects Version/s: 1.6
-
Component/s: None
The following LINQ Expression:
...Where(d => !d.BoolField)
Translates to {BoolField : {$ne : true.}} Well, this is not great for performance and the expression is not able to use an index as well as
{BoolField : false}would be able to use the index.
Since in the driver serialization, we know that the field will always be serialized to bool, it would be better to translate the expression to
{BoolField : false}instead.
(Note that (d => d.BoolField == false) appears to translate correctly.)