You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
npatki
changed the title
Validate that relationship must be between a **primary key** and **foreign key**
Validate that relationship must be between a primary key and foreign keyFeb 6, 2023
Version: SDV 1.0 (In development)
Problem Description
Currently, the metadata allows you add a relationship between two primary keys, as shown in #1232. This should not be allowed.
If you have a column that refers to another table, it must be a foreign key, not primary key.
Expected behavior
Running the code from #1232, we should throw an Error if you are specifying a relationship between 2 primary keys.
Output:
Additional context
The full specification is: A relationship must be between a primary key and a non-primary key.
We should also validate this this in the
MultiTableMetadata.validate
method.The text was updated successfully, but these errors were encountered: