Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand navigations on grouping key #29014

Open
Tracked by #30173
smitpatel opened this issue Sep 7, 2022 · 0 comments
Open
Tracked by #30173

Expand navigations on grouping key #29014

smitpatel opened this issue Sep 7, 2022 · 0 comments

Comments

@smitpatel
Copy link
Member

Enabling group by entity type allows navigations to be written on the grouping key.
e.g.

context.Customers.GroupBy(c => c.Navigation).Select(g => g.Key.Navigation2)

These navigations on grouping key cannot be expanded/translated in normal way because normal path will try to add Join after GroupBy, which doesn't translate to SQL. If we add join before GroupBy then it still won't be available in selector after grouping. All navigations on grouping key required to be created using subquery form using correlation predicate (and SingleOrDefault if reference navigation)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants