sequelize / sequelize-typescript

Decorators and some other features for sequelize
MIT License
2.78k stars 280 forks source link

Add "save" to AssociationActionOptions options #708

Open jabuj opened 4 years ago

jabuj commented 4 years ago

Versions

I'm submitting a ...

[x] bug report [ ] feature request

Related

244

Behavior

$set doesn't accept the save option described in sequelize documentation (https://sequelize.org/v5/class/lib/associations/belongs-to.js~BelongsTo.html#instance-method-set). The following code produces compilation error:

ModelA.$set('modelB', instanceOfB, { save: false })

It works with // @ts-ignore so it would be nice to add the save property to the AssociationActionOptions interface

RobinBuschmann commented 4 years ago

Hey @ialexi-bl , thanks for reporting!