Revert behavior to throw when attempting to modify an unconstrained alternate key property#32492
Merged
ajcvickers merged 1 commit intomainfrom Dec 5, 2023
Merged
Revert behavior to throw when attempting to modify an unconstrained alternate key property#32492ajcvickers merged 1 commit intomainfrom
ajcvickers merged 1 commit intomainfrom
Conversation
…lternate key property Fixes #28961 Reverts #30213 for #32385 In #32385, an unconstrained alternate key was added to the model purely to make a non-identifying relationship artificially identifying. #30213 attempted to fix this by throwing that the key was being modified. However, this scenario is very similar to the case for a many-to-many join type, where the composite primary key is also not the end of any relationship, but forces the two many-to-one relationships to be identifying. I prepared a PR that would only throw if the key involved is alternate, but on reflection that doesn't seem like an appropriate distinction to make. So overall, I think we should just revert this change, which is what this PR does.
Contributor
Author
|
Will port to 8.0 for servicing consider. |
Contributor
Author
|
Note from triage: agreed to revert the change and not special case alternate keys over primary keys. Which is what this PR does. :-) |
Contributor
Author
|
@dotnet/efteam Can I get a review on this so I can merge and prepare the patch PR? |
AndriySvyryd
approved these changes
Dec 5, 2023
ajcvickers
added a commit
that referenced
this pull request
Dec 5, 2023
…lternate key property (#32492) Fixes #28961 Reverts #30213 for #32385 In #32385, an unconstrained alternate key was added to the model purely to make a non-identifying relationship artificially identifying. #30213 attempted to fix this by throwing that the key was being modified. However, this scenario is very similar to the case for a many-to-many join type, where the composite primary key is also not the end of any relationship, but forces the two many-to-one relationships to be identifying. I prepared a PR that would only throw if the key involved is alternate, but on reflection that doesn't seem like an appropriate distinction to make. So overall, I think we should just revert this change, which is what this PR does.
wtgodbe
pushed a commit
that referenced
this pull request
Jan 3, 2024
…nconstrained alternate key property (#32523) * Revert behavior to throw when attempting to modify an unconstrained alternate key property (#32492) Fixes #28961 Reverts #30213 for #32385 In #32385, an unconstrained alternate key was added to the model purely to make a non-identifying relationship artificially identifying. #30213 attempted to fix this by throwing that the key was being modified. However, this scenario is very similar to the case for a many-to-many join type, where the composite primary key is also not the end of any relationship, but forces the two many-to-one relationships to be identifying. I prepared a PR that would only throw if the key involved is alternate, but on reflection that doesn't seem like an appropriate distinction to make. So overall, I think we should just revert this change, which is what this PR does. * Quirk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #32383
Reverts #30213 for #28961
In #32385, an unconstrained alternate key was added to the model purely to make a non-identifying relationship artificially identifying. #30213 attempted to fix this by throwing that the key was being modified. However, this scenario is very similar to the case for a many-to-many join type, where the composite primary key is also not the end of any relationship, but forces the two many-to-one relationships to be identifying.
I prepared a PR that would only throw if the key involved is alternate, but on reflection that doesn't seem like an appropriate distinction to make. So overall, I think we should just revert this change, which is what this PR does.