update同时使用in和condition时参数错位 #555

Closed
opened 2017-03-29 12:00:04 +00:00 by golangaccount · 3 comments
golangaccount commented 2017-03-29 12:00:04 +00:00 (Migrated from github.com)

type temp3 struct {
Id int xorm:"Id"
Name string xorm:"Name"
Test bool xorm:"Test"
}
postgres.In("Id", 5, 6, 7, 8).Update(&temp3{Name: "张三1"}, &temp3{Name: "aa"})
执行sql:[sql] UPDATE "temp3" SET "Name" = $1 WHERE "Name" = $2 AND ("Id" IN ($3,$4,$5,$6)) [args] [张三1 5 6 7 8 aa]

type temp3 struct { Id int `xorm:"Id"` Name string `xorm:"Name"` Test bool `xorm:"Test"` } postgres.In(`"Id"`, 5, 6, 7, 8).Update(&temp3{Name: "张三1"}, &temp3{Name: "aa"}) 执行sql:[sql] UPDATE "temp3" SET "Name" = $1 WHERE "Name" = $2 AND ("Id" IN ($3,$4,$5,$6)) [args] [张三1 5 6 7 8 aa]

Which version are you using?

Which version are you using?
golangaccount commented 2017-03-30 02:12:05 +00:00 (Migrated from github.com)

xorm v0.5.5.0711

xorm v0.5.5.0711

版本比较老了吧

版本比较老了吧
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: xorm/xorm#555
No description provided.