What's the proper way to handle transaction and after
hooks?
#13322
Answered
by
Falci
Falci
asked this question in
Help & Questions
-
I have an event in my app that updates the balance inside a transaction: sequelize.transaction(async t => {
await updateBalance(t);
await Payment.bulkCreate({...}, {
updateOnDuplicate: [...], transaction: t
});
}); The The problem I'm facing is: the select inside the hook is not getting the latest payment. |
Beta Was this translation helpful? Give feedback.
Answered by
Falci
Jun 17, 2021
Replies: 1 comment
-
I found a fix:
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Falci
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I found a fix: