MustCols+Update+AutoCond时有错。 #1797
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#1797
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?
想要清空error信息,结果清空不了,多出了 where AND last_error=''
具体为 UPDATE task_record SET last_error = '' WHERE id=4 AND last_error=''
如果使用.NoAutoCondition(true)的话,到是生成对了,但是就无法使用updated/version tag了。
需要注意的,如果不使用Update(..., condBean)的话,而是直接使用Where().Update()是没问题的。
即
建议重新梳理下update(..., condBean)中的condBean逻辑。。
#1784 工单的两个问题,也是类似,用起来不太正常。
另外用Cols()有坑,当使用了的用Cols时候,只会更新bean的Cols(...)和tag字段,不会更新其他字段。所以没法用Cols()...所以跑去用MustCols了。。。所以还是有坑。。。