[CSHARP-4370] Exception in .Where() matching Id Created: 17/Oct/22 Updated: 27/Oct/23 Resolved: 18/Oct/22 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | LINQ3 |
| Affects Version/s: | 2.18.0 |
| Fix Version/s: | None |
| Type: | Question | Priority: | Major - P3 |
| Reporter: | Dimitri Kroo | Assignee: | Robert Stam |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
| Comments |
| Comment by Githook User [ 24/Oct/22 ] |
|
Author: {'name': 'rstam', 'email': 'robert@robertstam.org', 'username': 'rstam'}Message: |
| Comment by Robert Stam [ 18/Oct/22 ] |
|
Thanks for letting us know that it is working for you. |
| Comment by Dimitri Kroo [ 18/Oct/22 ] |
|
Thank you for support! My bad... It was a class without [BsonRepresentation(MongoDB.Bson.BsonType.ObjectId)]. Somebody forgot to add the attribute and it was working with V2. V3 is stricter I guess. Best regards |
| Comment by Robert Stam [ 18/Oct/22 ] |
|
I attempted to reproduce this and for me it worked correctly. You can see my repro on the following branch and compare to see if I am doing anything differently than you: https://github.com/rstam/mongo-csharp-driver/tree/csharp4370 Note: there IS an `ExpressionNotSupportedException` thrown internally, but it is deliberate and is caught and handled. If you have the debugger configured to stop when ANY exception is thrown (even if there is a catch handler for it) you might be seeing this internal exception. |