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

In VisitUpdate, match table by alias rather than the exact same instance #34601

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ChrisJollyAU
Copy link
Contributor

@ChrisJollyAU ChrisJollyAU commented Sep 3, 2024

  • I've read the guidelines for contributing and seen the walkthrough
  • I've posted a comment on an issue with a detailed description of how I am planning to contribute and got approval from a member of the team
  • The code builds and tests pass locally (also verified by our automated build checks)
  • Tests for the changes have been added (for bug fixes / features) - Fixes a test so no further tests needed
  • Code follows the same patterns and style as existing code in this repo

VisitUpdate was using ReferenceEquals to match tables, which would only match if it was the same instance. It actually should be matching if the tables are the same even if the instance is different.

The only affected test is Replace_ColumnExpression_in_column_setter.
The sqlite test now works and the same change solves the problem for efcore.pg. SQL Server is unaffected as it has its own override which doesn't do this check

Fixes #33947

…ng to same table, even if not the same instance
@ChrisJollyAU
Copy link
Contributor Author

@dotnet-policy-service agree

@ChrisJollyAU
Copy link
Contributor Author

@roji Are we waiting on anything before this can me merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sqlite: "target object/alias may not appear in FROM clause" in ExecuteUpdate
2 participants