Update update.go

This commit is contained in:
lvcarrot 2020-11-27 20:20:23 +08:00 committed by GitHub
parent 0f77500917
commit 22c2027a30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,7 +66,7 @@ func Update(db *gorm.DB) {
} else {
return
}
db.Statement.Build("UPDATE", "SET", "WHERE")
db.Statement.Build("UPDATE", "SET", "WHERE", "RETURNING")
}
if _, ok := db.Statement.Clauses["WHERE"]; !db.AllowGlobalUpdate && !ok {