-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
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
db transaction issue #18
Comments
这是为啥呢,beetlsql不会主动提交事务导致的,不过应该是@with(BeetlSqlTransactional.class)没有发挥作用?
this.sm.getDs().isTransaction() 用来判断是否是否在事务环境,一般跟web框架集成,都会返回true |
@CrossLee However because you have already closed the response, therefore Solution, use say, the following code will make sure TX get committed: @Transactional
public void update2(Integer id, String name, H.Response resp) {
doUpdate(id, name);
resp.contentType("text/plaintext");
resp.writeText("done");
resp.close();
} |
@greenlaw110 是不是@transactional 都可以替代@with(BeetlSqlTransactional.class)? |
yes
…On Thu, Apr 2, 2020 at 3:11 PM Cross Lee ***@***.***> wrote:
@greenlaw110 <https://github.com/greenlaw110> ***@***.***
<https://github.com/transactional> ***@***.*** <https://github.com/with>
(BeetlSqlTransactional.class)?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#18 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABU6YV3ZWFVYIGIASUPPWTRKQF7VANCNFSM4LWRJ6MQ>
.
|
sample code:
The text was updated successfully, but these errors were encountered: