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

Avoid creating foreign keys with the same relational name #6143

Merged
merged 1 commit into from
Jul 26, 2016

Conversation

AndriySvyryd
Copy link
Member

Validate that matching foreign keys and indexes are compatible

Fixes #5769

@AndriySvyryd
Copy link
Member Author

@rowanmiller please review the exception messages

<value>The foreign keys {index1} on '{entityType1}' and {index2} on '{entityType2}' are both mapped to '{table}.{foreignKeyName}' but with different delete behavior ('{deleteBehavior1}' and '{deleteBehavior2}').</value>
</data>
<data name="DuplicateForeignKeyPrincipalColumnMismatch" xml:space="preserve">
<value>The foreign keys {index1} on '{entityType1}' and {index2} on '{entityType2}' are both mapped to '{table}.{foreignKeyName}' but referencing different principal columns ({principalColumnNames1} and {principalColumnNames2}).</value>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think maybe "target columns" rather than "principal columns"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, the Fluent API for this concept is HasPrincipleKey(...) so I think it's fine as-is.

@rowanmiller
Copy link
Contributor

:shipit: from an exception message point of view

@ajcvickers
Copy link
Contributor

:shipit:

Validate that matching foreign keys and indexes are compatible

Fixes #5769
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.

4 participants