We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm not getting a way to remove an association between these two models below:
@Table class Ticket extends Model { @PrimaryKey @AutoIncrement @Column id: number; @ForeignKey(() => Queue) @Column queueId: number; @BelongsTo(() => Queue) queue: Queue; }
@Table class Queue extends Model { @PrimaryKey @AutoIncrement @Column id: number; }
To associate a Queue to a Ticket I do the following:
const queueId = 1; await Ticket.findByPk(ticket.id).then(async ticket => { await ticket.update({ queueId }); ticket.reload(); });
Any ideas on how to remove this association?
Originally posted by @engmsilva in #774 (comment)
The text was updated successfully, but these errors were encountered:
Setting their queueId to null should do it:
await ticket.update({ queueId: null });
Sorry, something went wrong.
No branches or pull requests
I'm not getting a way to remove an association between these two models below:
To associate a Queue to a Ticket I do the following:
Any ideas on how to remove this association?
Originally posted by @engmsilva in #774 (comment)
The text was updated successfully, but these errors were encountered: