This is a regression from 2.3 -> 2.4. When upgrading to 2.4 it broke all these queries.
When doing a query such a Find where the filter is 'd => d._id == nullableId' where nullableId is a Guid? (Nullable<Guid>) there is a unsupported filter exception that throws. Here is the exception: System.ArgumentException: Unsupported filter: (Convert(
{document}{_id}) == 61d29f4c-7e8a-4eb6-b7ce-c1cbbc9cd1b2).
More info:
- we do a BsonRepresentation(BsonType.String) for all of our guids
- changing the query to d => d._id == nullableId.Value fixes the issue
- this is a regression
This is a non blocking issue because we can just add .Value to the nullable guid and it works
Note: this actually applies to all non-nullable members compared to nullable values, not just Guid.
- is duplicated by
-
CSHARP-1865 Unsupported filter exception after upgrading from 2.3 to 2.4 driver
- Closed
-
CSHARP-1453 Expressions used to resolve field names for enum members do not work
- Closed
- is related to
-
CSHARP-506 Throw better exception when comparing a non-nullable field to a nullable value
- Closed
- related to
-
CSHARP-1083 Null reference when serialize logical condition with null
- Closed
-
CSHARP-1865 Unsupported filter exception after upgrading from 2.3 to 2.4 driver
- Closed
-
CSHARP-1273 Find() fails with "Object reference not set to an instance of an object."
- Closed