-
Type: New Feature
-
Resolution: Done
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
-
Not Needed
-
Summary
I am running MongoDb 6.0.6
When upgrading from Mongodbdriver 2.18 to 2.19.2 several queries I run begin to fail with the ExpressionNotSupportedException.
How to Reproduce
Query on any string field e.g
_profileDataCollection.Find(model.GetFilter())
.Project(x => new ProfileReportModel {
Id = x.Id,
Bio = !string.IsNullOrWhiteSpace(x.Bio),
CurrentStatus = !string.IsNullOrWhiteSpace(x.CurrentStatus)
In this example Bio and CurrentStatus are string fields
Downgrading the connection to LinqProvider.V2 fixes the issue:
var clientSettings = MongoClientSettings.FromConnectionString(Configuration.GetConnectionString(nameof(StudentProfile)));
clientSettings.LinqProvider = LinqProvider.V2;
var client = new MongoClient(clientSettings);
It appears to be similar to this issue:
https://www.mongodb.com/community/forums/t/issue-with-2-18-to-2-19-nuget-upgrade-of-mongodb-c-driver/211894
- depends on
-
CSHARP-4683 Rename Linq3ImplementationTests folder to Linq3Implementation
- Closed