When I do any update/insert I have queries in a log file
START TRANSACTION
UPDATE/INSERT table SET .....
COMMIT
Is there any way to disable typeorm transactions by default for all queries?
You can't disable transactions for the whole application, but you can do it for individual calls of methods like save and remove. To do this, pass the transaction option with a value of false.
For example:
userRepository.save(users, { transaction: false });
userRepository.remove(users, { transaction: false });
See for details Additional options section.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With