The cardinality was 1 when a compound primary key is a foreign key when it therefore should be 0..N - as the other primary key can change too, rendering the possibility to have multiple entries with the same primary column a - as long as primary column b changes.
An example of this can be seen in the newsmeme.py example or in #21 .
This fixes the behavior introduced in #15 to match compound keys.
This also sets the correct value, if all primary_keys of one table are the foreign keys of all primary_keys of another table - rendering a compound 1 to 1 relationship.
Additional tests are added to make sure the intended behavior is reached.
The cardinality was 1 when a compound primary key is a foreign key when it therefore should be 0..N - as the other primary key can change too, rendering the possibility to have multiple entries with the same primary column a - as long as primary column b changes.
An example of this can be seen in the
newsmeme.py
example or in #21 .This fixes the behavior introduced in #15 to match compound keys.
This also sets the correct value, if all primary_keys of one table are the foreign keys of all primary_keys of another table - rendering a compound 1 to 1 relationship.
Additional tests are added to make sure the intended behavior is reached.