engine.Context接口bug #1491
Labels
No Label
backport/done
backport/v1
blocked
db
oracle
db
sqlserver
duplicate
feature
cache
frontport/done
frontport/main
invalid
kind
breaking
kind
bug
kind
build
kind
dependencies
kind
docs
kind
driver
kind
enhancement
kind
feature
kind
performance
kind
proposal
kind
question
kind
refactor
kind
testing
need
feedback
need
test
proposal:accepted
RaspBerry Pi
regression
skip-changelog
upstream
wip
wontfix
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#1491
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
现象:这个接口如果使用Session.Begin()会触发bug,事务没办法使用,事务的第一条操作自动回滚,后续操作继续执行,
建议:去掉这一行代码:session.isAutoClose = true
临时解决办法:使用engine.NewSession().Context(ctx)来规避这个bug
Could you show example code?
OKay. You have to do like this
session.Begin()
should return error if it's an auto commit session.好坑==,能否在文档中说明此方法的坑呀,问了几个同事,只要是用过的都踩过这个坑。。
能帮忙发个PR吗?