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

Exception when translating GroupBy-FirstOrDefault-Contains on entity #28524

Closed
smitpatel opened this issue Jul 26, 2022 · 0 comments · Fixed by #28781
Closed

Exception when translating GroupBy-FirstOrDefault-Contains on entity #28524

smitpatel opened this issue Jul 26, 2022 · 0 comments · Fixed by #28781
Assignees
Labels
area-query closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. customer-reported type-bug
Milestone

Comments

@smitpatel
Copy link
Contributor

    [ConditionalTheory]
    [MemberData(nameof(IsAsyncData))]
    public virtual Task Where_delete_predicate_with_group_by_aggregate_2(bool async)
        => AssertDelete(
            async,
            ss => ss.Set<OrderDetail>()
                .Where(e => ss.Set<Order>()
                            .GroupBy(o => o.CustomerID)
                            .Where(g => g.Count() > 9)
                            .Select(g => g.First()).Contains(e.Order)),
            rowsAffectedCount: 40);

Not a bulk delete issue but the where predicate fails to translate since Contains is converted to Any and we don't process ShapedQueryExpression properly.

@smitpatel smitpatel self-assigned this Jul 26, 2022
@ajcvickers ajcvickers added this to the Backlog milestone Jul 27, 2022
@smitpatel smitpatel added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Aug 18, 2022
@smitpatel smitpatel modified the milestones: Backlog, 7.0.0 Aug 18, 2022
smitpatel added a commit that referenced this issue Aug 18, 2022
Visit retrived ProjectionBinding from select expression as projection binding can bind to non-SqlExpression too.

Resolves #28524
smitpatel added a commit that referenced this issue Aug 18, 2022
Visit retrived ProjectionBinding from select expression as projection binding can bind to non-SqlExpression too.

Resolves #28524
Resolves #28745
smitpatel added a commit that referenced this issue Aug 18, 2022
Visit retrived ProjectionBinding from select expression as projection binding can bind to non-SqlExpression too.

Resolves #28524
Resolves #28745
Resolves #28752
smitpatel added a commit that referenced this issue Aug 19, 2022
Visit retrived ProjectionBinding from select expression as projection binding can bind to non-SqlExpression too.

Resolves #28524
Resolves #28745
Resolves #28752
@ajcvickers ajcvickers modified the milestones: 7.0.0, 7.0.0-rc2 Aug 22, 2022
@ajcvickers ajcvickers modified the milestones: 7.0.0-rc2, 7.0.0 Nov 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-query closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. customer-reported type-bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants