sequelize-typescript
sequelize-typescript copied to clipboard
Update method with where options
Hi everyone!
I'm trying to update and delete one row of a specific table, but I don't know if the syntaxis that I'm using is correct.
For example for destroying I coded the next one:
.model.destroy({ where: { "ReqID": id } as any } });
The transaction is completed, but I've observed the syntaxis inside where clause is not correct, for this reason I'm using "as any" inside where.
How is the correct syntaxis then? I've tried with:
model.destroy({ where: { attribute: { "ReqID": id } } });
but without success.
Can someone help with this?
Thanks in advance