Special method/mixin "add" for BelongsToMany association overrides record instead of creating a new one #16984
Labels
pending-approval
Bug reports that have not been verified yet, or feature requests that have not been accepted yet
type: bug
Issue Creation Checklist
Bug Description
Reproducible Example
Here is the link to the SSCCE for this issue: rdsedmundo/20240123-sequelize-add-mixin-method-bug@af84fd6
What do you expect to happen?
A new record should have been created, especially because another field of the junction table is passed—although to be honest in any case I think I'd expect what is happening without an unique constraint being defined.
Setting
through.unique
tofalse
doesn't change anything.What is actually happening?
The third test is executing this:
Environment
Would you be willing to resolve this issue by submitting a Pull Request?
Indicate your interest in the resolution of this issue by adding the 👍 reaction. Comments such as "+1" will be removed.
The text was updated successfully, but these errors were encountered: