Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HasManyCreateAssociationMixin does not have primary key assigned #675

Open
Bullfrog1234 opened this issue Jan 13, 2025 · 1 comment
Open

Comments

@Bullfrog1234
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@Bullfrog1234 and others