[Support] QA:使用@midwayjs/sequelize如何使用事务? #3550
-
Describe the problem(描述问题)使用@midwayjs/sequelize如何开启事务?最好是自动托管事务。看到typeorm有详细的相关文档,但是sequelize的文档中没有提及事务相关 Midway Versions(Midway 版本)✓ @midwayjs/sequelize(3.13.9) |
Beta Was this translation helpful? Give feedback.
Answered by
czy88840616
Jan 12, 2024
Replies: 1 comment 2 replies
-
sequelize-typescript 看起来并没有提供事务处理的装饰器等方法,目前仅能通过底层 sequelize 的 api 去处理。 https://sequelize.org/docs/v6/other-topics/transactions/ |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
就按他写的,require('sequelize'); 就行