[CSHARP-4423] LinqProvider.V3 Odata filter problem with id filter (string/ObjectId) Created: 21/Nov/22  Updated: 28/Oct/23  Resolved: 06/Jul/23

Status: Closed
Project: C# Driver
Component/s: LINQ3
Affects Version/s: 2.18.0
Fix Version/s: 2.21.0

Type: Bug Priority: Minor - P4
Reporter: Dimitri Kroo Assignee: Oleksandr Poliakov
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Epic Link: oData support for LINQ3
Quarter: FY24Q2
Backwards Compatibility: Fully Compatible
Documentation Changes: Not Needed
Documentation Changes Summary:

1. What would you like to communicate to the user about this feature?
2. Would you like the user to see examples of the syntax and/or executable code and its output?
3. Which versions of the driver/connector does this apply to?


 Description   

Hi,

after switching from V2 to V3 we get an exception by filtering with Odata:

https://localhost:5001/odata/items?&$filter=id%20eq%20%27000000000000000000000001%27%20

MongoDB.Driver.Linq.ExpressionNotSupportedException: 'Expression not supported: Convert($it.Id, String).'

public class Item
{
[BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)]
public string Id

{ get; set; }

}

 

Thanks!



 Comments   
Comment by Githook User [ 06/Jul/23 ]

Author:

{'name': 'Oleksandr Poliakov', 'email': '31327136+sanych-sun@users.noreply.github.com', 'username': 'sanych-sun'}

Message: CSHARP-4423: LinqProvider.V3 Odata filter problem with id filter (#1130)
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/14e7b8761905b4187250818be0d3522a4ce5876f

Comment by Janis Zinn [ 30/Jun/23 ]

Is it possible to fix the issue? It is the only problem with odata forcing us to use LINQ V2. We understand, that the feature is planned FY24Q2, but it would be very nice to get it fixed ealier.

 

Thanks in advance!

Generated at Wed Feb 07 21:48:11 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.