Details
-
Bug
-
Resolution: Fixed
-
Unknown
-
None
-
None
-
None
-
Fully Compatible
Description
Summary
When doing an aggregate containing a projection expression like:
.Project(
|
augmentedProductType => new ProductTypeSearchResult |
{
|
IsExternalUrl = string.IsNullOrEmpty(augmentedProductType.ShopUrl ?? "") |
}
|
An InvalidOperationException occurs with message "Cannot find serializer for null."
This happens with string.Empty as well.
Driver version 2.14.1
How to Reproduce
Steps to reproduce. If possible, please include a Short, Self Contained, Correct (Compilable), Example.
Additional Background
Please provide any additional background information that may be helpful in diagnosing the bug.
This seems to occur in ConstantExpressionToAggregationExpressionTranslator when making the call to get the serializer.

Attachments
Issue Links
- related to
-
CSHARP-2674 string.IsNullOrEmpty is false when field does not exist.
-
- Closed
-