[BUG] Update 在报错 “No content found to be updated” 之后同一个session再执行其他操作,会把statement内容带入下一个请求中 #1900
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
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#1900
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 := NewSession()
session.Where("id = ?", id).Update(&Model{}) // model 全部是默认值,没使用cols
session.WHere("user_id = ?").Find(&UserListSlice)
这行代码就会把 Where("id = ?", id) 带到这里
原因是 resetStatement 在 exec 方法中
insert 这些 resetStatement 都在最外层defer里面 ,这个是否也应该移出来?