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

[6.0.x] Return null constraint names for keys and FKs on entity types not mapped to a table. #27857

Merged
merged 1 commit into from
May 6, 2022

Conversation

AndriySvyryd
Copy link
Member

@AndriySvyryd AndriySvyryd commented Apr 21, 2022

Description
When getting the FK name the code assumed that both entity types are mapped to tables, since it's the only way an FK constraint can be created in the database.

Customer impact
When creating a foreign key between an entity type mapped to a view and an entity type mapped to a table an exception is thrown. No known workaround other than not creating the FK.

How found
Customer reported on 6.0.

Regression
Yes, From 5.0.

Testing
Added tests for this scenario.

Risk
Low risk, avoids NRE.

Partial backport of 786cb40
Fixes #27854

@wtgodbe wtgodbe merged commit ee7aa35 into release/6.0 May 6, 2022
@wtgodbe wtgodbe deleted the Issue27854 branch May 6, 2022 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants