Files
go-admin/template
zhangwenjian 3112896a83 fix🐛: stop a generated Update when its row is not found
Update looked its row up and ignored the result. When nothing matched -
because the key does not exist, or because the caller's data scope filters
the row out - the model stayed at its zero value, Generate copied the
request onto it, and Save, finding a zero key, inserted a new row. The
update of a row the caller may not see became a row they now own, and the
RowsAffected check meant to refuse it never fired, because the insert did
affect one.

A missing row now ends the update with the same "无权更新该数据" the
RowsAffected check returns, and any other lookup error is returned as is.
This applies to every generated table, an int id included.
2026-09-25 20:00:30 +08:00
..
2021-07-14 11:48:40 +08:00
2021-03-07 15:37:14 +08:00