Skip to content
This repository has been archived by the owner on Sep 7, 2021. It is now read-only.
This repository is currently being migrated. It's locked while the migration is in progress.

Engine.Update方法有BUG! #10

Closed
insionng opened this issue Sep 8, 2013 · 1 comment
Closed

Engine.Update方法有BUG! #10

insionng opened this issue Sep 8, 2013 · 1 comment

Comments

@insionng
Copy link
Contributor

insionng commented Sep 8, 2013

thisid, err := Engine.Update(nd, &Node{Id: nid})
thisid的值始终返回1,正确应该返回被更新的字段id.希望尽快修复!

@lunny
Copy link
Member

lunny commented Sep 8, 2013

affcted, err := engine.Update(nd, &Node{Id: nid}),第一个返回参数为影响的记录数,而不是影响的id,因为update可能影响多条记录,这里返回id不是十分合适;如果返回多个id,代价又太大。

@lunny lunny closed this as completed Sep 8, 2013
admpub added a commit that referenced this issue Apr 21, 2014
BetaCat0 pushed a commit to BetaCat0/xorm that referenced this issue Jul 31, 2018
Also, uncomment an older test that is now passing reliably!
And change error from "to be update" to "to be insert" in
builder_insert.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants