dotnet / dotnet/efcore

Query: Bulk Delete on result of First family in projection

Open
#28,525 3 comments 0 reactions 0 assignees View on GitHub
area-groupby area-query customer-reported
Dominant language
C#
Stars
14.8k
Forks
3.4k
PR merge metrics
PR metrics pending

Description

```C#
[ConditionalTheory]
[MemberData(nameof(IsAsyncData))]
public virtual Task Delete_GroupBy_Where_Select(bool async)
=> AssertDelete(
async,
ss => ss.Set()
.GroupBy(od => od.OrderID)
.Where(g => g.Count() > 5)
.Select(g => g.First()),
rowsAffectedCount: 284);
```

This causes the shaper to be a projection which is entity. Even if we apply projection it causes a subquery in SelectExpression. We can come up with some SQL to represent this (though our current structure is not supported in delete operation and not easy way to convert to subquery)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.