We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 17eab99 + 8bf95a8 commit 9d549dcCopy full SHA for 9d549dc
src/adapters/sequelize.js
@@ -87,7 +87,9 @@ module.exports = (model, opts) => {
87
const pkIsFk = primaryKeyIsForeignKey(association);
88
if (pkIsFk) {
89
const fk = fields.find((field) => field.reference === `${association.associationAccessor}.${association.foreignKey}`);
90
- fk.foreignAndPrimaryKey = true;
+ if (fk) {
91
+ fk.foreignAndPrimaryKey = true;
92
+ }
93
}
94
});
95
0 commit comments