Skip to content

[release/7.0] Query: Don't fail translation of aggregate when owned navigations #29243

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Oct 3, 2022

Conversation

smitpatel
Copy link
Contributor

@smitpatel smitpatel commented Sep 30, 2022

Resolves #29201

Description

Regression in a relatively important case where aggregate functions are used over owned type mapped to the same table as the owner. For example:

var query = context.Books
    .GroupBy(post => post.Author.Id)
    .Select(grouping => new
    {
        Author = grouping.Key,
        TotalCost = grouping.Sum(post => post.Detail.Price),
    });

This was due to a significant change in the design for aggregate functions, enabling a lot of new functionality in EF7. We were missing test cases for this.

Customer impact

Exception in a relatively common query case that worked in EF Core 6.0.

How found

Found writing docs for new features.

Regression

Yes. from 6.0.

Testing

New testing added; will also investigate additional testing in this area.

Risk

Low, since the test removes an incorrect check when looking for errors.

@smitpatel smitpatel changed the title Query: Don't fail translation of aggregate when owned navigations [release/7.0] Query: Don't fail translation of aggregate when owned navigations Sep 30, 2022
@ajcvickers ajcvickers added this to the 7.0.0 milestone Oct 3, 2022
@smitpatel smitpatel merged commit a05de75 into release/7.0 Oct 3, 2022
@smitpatel smitpatel deleted the smit/justcause branch October 3, 2022 20:28
@ajcvickers ajcvickers removed this from the 7.0.0 milestone Oct 5, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants