sequelize-auto
sequelize-auto copied to clipboard
HasManyCreateAssociationMixin does not have primary key assigned
When there is a many to many relationships it builds to the following:
addAccountRoles!: Sequelize.HasManyAddAssociationsMixin<
AccountRole,
AccountRoleId
>;
createAccountRole!: Sequelize.HasManyCreateAssociationMixin<
AccountRole
>;
removeAccountRole!: Sequelize.HasManyRemoveAssociationMixin<
AccountRole,
AccountRoleId
>;
The mixin HasManyCreateAssociationMixin has a second property for the Foreign Key, this should be set to primary key. In most cases this should be the Primary Key of the table unless the foreign key name is something difference