[CSHARP-2269] Using condition on Linq Aggregation is not working Created: 11/May/18 Updated: 28/Oct/23 Resolved: 15/Feb/22 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Linq |
| Affects Version/s: | 2.6.0 |
| Fix Version/s: | 2.14.0 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | Liviu Rezmerita | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Windows 10, Visual Studio 2017 |
||
| Attachments: |
|
| Epic Link: | CSHARP-3615 |
| Description |
|
I noticed this issue while doing the course on university.mongodb.com On Homework 3.1 we are requested to remove the smallest score from a list. I did this query in .net to get all the scores that are greater than the minimum:
The generated command is:
If you look closely you will notice that the $min condition is wrong, it's using "$$sc1.scores.score" instead of "$scores.score" ($$sc1 = $scores).
Also I've tried to do linked Select, but it's not supported:
The Students collection:
|
| Comments |
| Comment by James Kovacs [ 15/Feb/22 ] | ||||
|
This issue has been fixed in the new LINQ provider (known as LINQ3), which is included in the 2.14 release. Configure your MongoClientSettings to use LinqProvider.V3 if you want to use this functionality. To configure a client to use the LINQ3 provider use code like the following
| ||||
| Comment by Richard Collette [ 17/Feb/20 ] | ||||
|
There are only 3 critical bugs in this tracker and yet this has sat for 19 months? I guess that would be fine if this project were solely an open source endeavor but as an employee at a paying Atlas customer, I have to wonder what is going on here? |