[CSHARP-4723] Linq V2 Projection when upgrading from 2.19.1 to 2.19.2 Created: 14/Jul/23 Updated: 28/Oct/23 Resolved: 02/Aug/23 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | 2.19.2 |
| Fix Version/s: | 2.21.0 |
| Type: | Bug | Priority: | Unknown |
| Reporter: | Fred Morel | Assignee: | Oleksandr Poliakov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Documentation Changes: | Not Needed | ||||||||
| Documentation Changes Summary: | 1. What would you like to communicate to the user about this feature? |
||||||||
| Description |
SummaryA LINQ projection that used to work is now failing. Specifically, `x => x`. We have helper method to wrap most FindOneAndUpdates to consistently handles things like "ID does not exist". To reduce code, there's an overload with no projection that just calls the overload that supports projection with a barebones `x => x`. After upgrading to 2.19.2, this is now throwing an exception. We are still using the V2 LINQ translator. Please provide the version of the driver. If applicable, please provide the MongoDB server version and topology (standalone, replica set, or sharded cluster).When upgrading driver from 2.19.1 to 2.19.2. MongoDB 6.0.x running in Atlas. How to ReproduceSteps to reproduce. If possible, please include a Short, Self Contained, Correct (Compilable), Example.
Additional BackgroundStack trace:
|
| Comments |
| Comment by Githook User [ 02/Aug/23 ] |
|
Author: {'name': 'Oleksandr Poliakov', 'email': '31327136+sanych-sun@users.noreply.github.com', 'username': 'sanych-sun'}Message: |
| Comment by Robert Stam [ 02/Aug/23 ] |
|
This ticket is partially about x => x projection and partially about FindOneAndReplace calling Render instead of RenderForFind. The x => x part has been factored out as |
| Comment by Robert Stam [ 24/Jul/23 ] |
|
oleksandr.poliakov@mongodb.com can you look at 4681 at the same time? I think they are related. Update: I misread the projection as x => x (instead of x => x.Id). Perhaps this is not actually related to 4681. |
| Comment by Boris Dogadov [ 17/Jul/23 ] |
|
Thanks you for filling this bug fred.morel@onepeloton.com . Please follow this ticket for any further updates. |
| Comment by PM Bot [ 14/Jul/23 ] |
|
Hi fred.morel@onepeloton.com, thank you for reporting this issue! The team will look into it and get back to you soon. |