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

Multiple Relationships Between 2 Tables #10

Open
valhuber opened this issue Nov 2, 2022 · 0 comments
Open

Multiple Relationships Between 2 Tables #10

valhuber opened this issue Nov 2, 2022 · 0 comments
Assignees

Comments

@valhuber
Copy link
Owner

valhuber commented Nov 2, 2022

An uncommon data model concept is a child table with 2 foreign keys to the same table. For example, an employee might have a WorksForDeptNum, and an OnLoanDeptNum - both Foreign Keys to Department.

The system currently restricts this (with an appropriate error), so you cannot have sums/counts in such cases. The system presumes only 1, and throws a "TODO - disambiguate relationship" exception.

It should be possible to add a Sum/Count property child_role_name to designate the intended relationship.

@valhuber valhuber self-assigned this Nov 2, 2022
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