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

Revisit multiple principals issue #12592

Closed
ajcvickers opened this issue Jul 6, 2018 · 3 comments
Closed

Revisit multiple principals issue #12592

ajcvickers opened this issue Jul 6, 2018 · 3 comments
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Milestone

Comments

@ajcvickers
Copy link
Contributor

Issue #12227 is planned to be patched with #12571. However, some things still need doing post-patch:

  • GetPrincipal should be fixed, and a new method should be added to get all possible principals
  • Decide if/how required/optional relationships should be handled differently
  • Consider allowing non-nullable optional foreign keys in this case
@AndriySvyryd
Copy link
Member

Non-nullable optional foreign keys might need #13146

@ajcvickers
Copy link
Contributor Author

Marking for re-triage. Proposal: we stop throwing here ever if the principal found does not match the expected type. The reasoning is that just because non of the loaded principals match does not mean that none of the principals in the database match.

For the common case, a database FK constraint violation will be thrown anyway when SaveChanges is called.

So the code change we would make here is to always filter out principals that match by key value but for which the type does not match.

@ajcvickers
Copy link
Contributor Author

Triage: we will merge this as is, but pinging @divega to take a look.

ajcvickers added a commit that referenced this issue Mar 1, 2019
@ajcvickers ajcvickers added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Mar 1, 2019
@ajcvickers ajcvickers added this to the 3.0.0 milestone Mar 1, 2019
@AndriySvyryd AndriySvyryd removed their assignment Mar 27, 2019
@ajcvickers ajcvickers modified the milestones: 3.0.0, 3.0.0-preview4 Apr 15, 2019
@ajcvickers ajcvickers modified the milestones: 3.0.0-preview4, 3.0.0 Nov 11, 2019
@ajcvickers ajcvickers removed their assignment Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-bug
Projects
None yet
Development

No branches or pull requests

3 participants