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

[release/7.x] Fixes around IncludeExpression for ExecuteUpdate/Delete (#30571) #30579

Merged
merged 1 commit into from
Apr 4, 2023

Conversation

roji
Copy link
Member

@roji roji commented Mar 25, 2023

Fixes #30572
Fixes #30528
Backport of #30571

Description

When an owned entity or auto-include was defined on an entity type, this causes IncludeExpressions to be added to the query tree which interfere with ExecuteUpdate/Delete.

Customer impact

Using ExecuteUpdate/Delete against entities which have owned entities or auto-includes would fail in some major scenarios.

How found

Customer report on 7.0

Regression

No, ExecuteUpdate/Delete are new in 7.0.

Testing

Added regression tests.

Risk

Low: The fix is local to ExecuteUpdate/Delete and is simple. Quirks have been added.

* Fully prune IncludeExpression before ExecuteUpdate, not just for the
  property lambda
* Prune also non-owned Includes

Fixes dotnet#30572
Fixes dotnet#30528

(cherry picked from commit 4c6f854)
@rbhanda rbhanda modified the milestones: 7.0.5, 7.0.6 Mar 28, 2023
@wtgodbe wtgodbe merged commit c3c1a40 into dotnet:release/7.0 Apr 4, 2023
@rbhanda rbhanda modified the milestones: 7.0.6, 7.0.7 Jun 1, 2023
@ajcvickers ajcvickers removed this from the 7.0.7 milestone Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants