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.
1 parent 208f230 commit 6f06512Copy full SHA for 6f06512
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