[5.0-rc2] Mark join entities as Added when either side is Added #22669
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 #22647
Description
If the entity on either end of a many-to-many relationship is Added, then any join entity instance must be new since it references a new entity via a required relationship. This change improves the many-to-many experience by detecting this case.
Customer Impact
This is an improvement to the experience for the new many-to-many feature. Doing this now instead of in the future avoids a breaking change after 5.0. Therefore, doing this now will help customers have a seamless update to 6.0.
How found
Customer reported on RC1.
Test coverage
Added additional test coverage around this case.
Regression?
No; new feature.
Risk
Low; small change in behavior.