Skip to content

Commit

Permalink
Merge pull request #148 from Zendro-dev/147-spa-paired-end-foreign-keys
Browse files Browse the repository at this point in the history
  • Loading branch information
qwerdenkerXD authored Dec 19, 2023
2 parents 71bf8d5 + 9e895cb commit a6d22cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function getForeignKeys(dataModel: DataModel): Set<string> {
case 'one_to_one':
case 'many_to_one':
case 'one_to_many':
return keys.add(targetKey);
return sourceKey ? keys.add(sourceKey) : keys.add(targetKey);
case 'many_to_many':
return sourceKey ? keys.add(sourceKey) : keys;
default:
Expand Down

0 comments on commit a6d22cc

Please sign in to comment.