1
0
Fork 0
forked from forgejo/forgejo

Reduce usage of allcols on update (#2596)

* reduce usage of allcols on update

* fix bug and tests
This commit is contained in:
Lunny Xiao 2017-09-25 12:59:27 +08:00 committed by GitHub
parent 6b6f16cfae
commit dd55534b82
10 changed files with 21 additions and 25 deletions

View file

@ -101,7 +101,7 @@ func UpdateIssueUsersByMentions(e Engine, issueID int64, uids []int64) error {
iu.IsMentioned = true
if has {
_, err = e.Id(iu.ID).AllCols().Update(iu)
_, err = e.Id(iu.ID).Cols("is_mentioned").Update(iu)
} else {
_, err = e.Insert(iu)
}