Fixes around IncludeExpression for ExecuteUpdate/Delete#30571
Fixes around IncludeExpression for ExecuteUpdate/Delete#30571roji merged 2 commits intodotnet:mainfrom
Conversation
8153f74 to
945be53
Compare
|
@maumar I pushed another commit here in order to also fix #30572, which is related; basically is to prune all IncludeExpressions before ExecuteUpdate/Delete, since they have no meaning in that context (nothing is coming back from the database) and they interfere with translation. This works well for SQL Server, but the new test Delete_entity_with_auto_include fails for SQLite; since SQLite doesn't support JOINs directly, we use a different path and transform to subquery with entity equality (code). There's a weird exception happening in this path, which looks like a malformed ProjectionBindingExpression (see stack trace below). I don't think I introduced this bug here, but can you please tell a look and tell me what you think? Exception stack trace |
|
the new change looks good, I will try to dig into the underlying projection binding issue, but that's orthogonal. |
* 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)
* 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)
Fixes #30528
Fixes #30572