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

Bug in EntitySet.add_relationship can cause foreign_key tag to be lost #1674

Closed
thehomebrewnerd opened this issue Sep 7, 2021 · 1 comment
Assignees

Comments

@thehomebrewnerd
Copy link
Contributor

Bug in EntitySet.add_relationship can cause foreign_key tag to be lost

In EntitySet.add_relationship, the foreign_key semantic tag is added to the child column in a relationship. There is also a check to make sure that the logical type of the child column matches the logical type of the parent column and if not, the logical type for the child column is updated to match the parent.

The foreign_key tag is added before the logical type check. As a result, when the logical type is changed, the previously set foreign key tag is lost.

The code should be updated to add the foreign_key tag at the end of the method, after the logical type has been changed.

@thehomebrewnerd
Copy link
Contributor Author

Closed by #1675

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

No branches or pull requests

1 participant