-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
AutoInclude causes ExecuteUpdate/Delete to have useless JOIN #29992
Labels
area-bulkcud
punted-for-8.0
Originally planned for the EF Core 8.0 (EF8) release, but moved out due to resource constraints.
type-bug
Milestone
Comments
Note that ExecuteUpdate works, but the SQL contains the useless JOIN from the AutoInclude: UPDATE [b]
SET [b].[Name] = N'foo'
FROM [Blogs] AS [b]
INNER JOIN [BlogDetails] AS [b0] ON [b].[DetailsId] = [b0].[Id] This also doesn't happen with an owned entity, so I suspect the same origin. |
roji
changed the title
AutoInclude causes ExecuteDelete to fail
AutoInclude causes ExecuteDelete to fail and ExecuteUpdate to have useless JOIN
Jan 5, 2023
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
roji
changed the title
AutoInclude causes ExecuteDelete to fail and ExecuteUpdate to have useless JOIN
AutoInclude causes ExecuteUpdate to have useless JOIN
Mar 24, 2023
Note the interesting difference between owned and auto-include in the pre-translation query trees (/cc @maumar): Owned:
Auto-include:
|
Note: split the Delete issue out to #30572 |
roji
changed the title
AutoInclude causes ExecuteUpdate to have useless JOIN
AutoInclude causes ExecuteUpdate/Delete to have useless JOIN
Mar 24, 2023
ajcvickers
added
the
punted-for-8.0
Originally planned for the EF Core 8.0 (EF8) release, but moved out due to resource constraints.
label
Jun 28, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area-bulkcud
punted-for-8.0
Originally planned for the EF Core 8.0 (EF8) release, but moved out due to resource constraints.
type-bug
With 8.0.0-alpha.1.23055.2, having an AutoInclude navigation on the target entity type causes ExecuteDelete to fail. Note that ExecuteUpdate does work correctly, and having an owned entity type also works (see related #28727):
The text was updated successfully, but these errors were encountered: