-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Partial fix to #3103 - Must be reducible node exception when performi…
…ng Join Problem is in a query with join, that has a navigation property in inner key selector. We normally try to expand the navigation property into a join clause, however if done for inner key selector, leads to chicken-and-egg problem: e.g. from p in ctx.Payouts join a in ctx.Assets on p.Id equals a.Good.Id select p translated to: from p in ctx.Payouts join g in ctx.Good on a.Id equals g.Id // invalid, because a was not declared yet join a in ctx.Assets on g.Id equals a.Id (alternatively) from p in ctx.Payouts join a in ctx.Assets on g.Id equals a.Id // invalid, because g was not declared yet join g in ctx.Good on a.Id equals g.Id Is some cases this can we worked around by translating navigation property into a FK: from p in ctx.Payouts join a in ctx.Assets on p.Id equals a.GoodId select p This is only possible if we actually have foreign key on this side of the navigation, and if the navigation itself is simple (not nested, not composite and we are accessing PK after the navigation).
- Loading branch information
Showing
3 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters