[CSHARP-4246] Support concise syntax for Lookup Created: 08/Jul/22 Updated: 09/Aug/23 |
|
| Status: | Backlog |
| Project: | C# Driver |
| Component/s: | Builders |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Unknown |
| Reporter: | Dmitry Lukyanov (Inactive) | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
5.0 server has added a slightly new lookup syntax. See for details https://www.mongodb.com/docs/manual/reference/operator/aggregation/lookup/#correlated-subqueries-using-concise-syntax |
| Comments |
| Comment by James Kovacs [ 11/Jul/22 ] | ||||||||||||||||||
|
After discussion with dmitry.lukyanov@mongodb.com, I see that we have two IAggregateFluent overloads for Lookup, one that takes a pipeline and another one that takes a localField/foreignField. We however do not have one that takes a pipeline and localField/foreignField at the same time. We will consider adding this in a future version. | ||||||||||||||||||
| Comment by James Kovacs [ 11/Jul/22 ] | ||||||||||||||||||
|
If I’m understanding this correctly, MongoDB previously used a verbose syntax for $lookup:
which required you to specify the join condition inside a $expr in the pipeline. The concise syntax adds localField and foreignField performing an equality match between these fields:
Because of the way Join and Group are implemented in LINQ, we already use the concise syntax. So unless I'm missing some subtlety, we can close this as Done. |