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

[8.x] Fix eager loading one-of-many relationships with multiple aggregates #37436

Merged
merged 2 commits into from
May 20, 2021
Merged

[8.x] Fix eager loading one-of-many relationships with multiple aggregates #37436

merged 2 commits into from
May 20, 2021

Conversation

cbl
Copy link
Contributor

@cbl cbl commented May 20, 2021

This pr fixes eager loading one-of-many relations with multiple aggregates.

Before fix: http://sqlfiddle.com/#!9/cef514/7
After fix: http://sqlfiddle.com/#!9/cef514/8

All inner join sub queries must be grouped by the relationship group columns, not the previous aggregated column from the previous sub query.

The issue was pointed out by @sblawrie in #37362 (comment)

@cbl cbl changed the title [8.x] Fix eager loading with multiple aggregates [8.x] Fix eager loading one-of-many relationships with multiple aggregates May 20, 2021
@cbl
Copy link
Contributor Author

cbl commented May 20, 2021

@dianfishekqi this should also fix #37362 (comment)

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

Successfully merging this pull request may close these issues.

2 participants