-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
Fully Compatible
-
Dotnet Drivers
-
Not Needed
-
None
-
None
-
None
-
None
-
None
-
None
Summary
invalid variable names generated for mongo command when using reflection and list filtering
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
when using the mongo db library LinqProvider.V3 to filter based on a inner list and additional using projection some invalid variable names are created.
the library uses LinqProvider.V3 to generate the mongo commands from linq and the generated query has a '' at the start of the variable for some reason, that result in an exception: "Command aggregate failed: invalid $project :: cause by :::'s0' starts with an invalid character for a user variable name".
without the '' the query works perfectly._
Additional Background
we are using the hot chocolate library to provide our mongo db instance and when we are using the use projection and filtering on a list field in the document we are fetching.