Skip to content

Why transaction does not rollback while inserting row with raw SQL? #17237

Answered by ephys
kom24al asked this question in Help & Questions
Discussion options

You must be logged in to vote

Pass the transaction option in the second parameter:

await sequelize.query(insertQuery, {
  replacements: orderInfoData,
  type: QueryTypes.INSERT,
  transaction,
})

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@kom24al
Comment options

@ephys
Comment options

@kom24al
Comment options

@ephys
Comment options

Answer selected by kom24al
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants