engine.Table("test").Where().Update(map数据))无效 #443
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#443
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?
我所有的insert或者update都是指定列的
但执行engine.Table("test").Where().Update(map数据))无效
所以不得不用engine.Table("test").Where().Cols().Update(test表struct), 这样在执行该语句前,所有的字段赋值必须是两句操作:
var cols []string
cols = append(cols, 列名)
test.列名 = 值
这样很麻烦,也很容易因为遗漏某个字段赋值而出错