order by for update not supported
This commit is contained in:
parent
edc2d5cc57
commit
a06ca0d4d6
2
main.go
2
main.go
@ -419,7 +419,7 @@ func (s *DB) UpdateColumn(attrs ...interface{}) *DB {
|
|||||||
|
|
||||||
// UpdateColumns update attributes without callbacks, refer: https://jinzhu.github.io/gorm/crud.html#update
|
// UpdateColumns update attributes without callbacks, refer: https://jinzhu.github.io/gorm/crud.html#update
|
||||||
func (s *DB) UpdateColumns(values interface{}) *DB {
|
func (s *DB) UpdateColumns(values interface{}) *DB {
|
||||||
return s.NewScope(s.Value).
|
return s.Order(nil, true).NewScope(s.Value).
|
||||||
Set("gorm:update_column", true).
|
Set("gorm:update_column", true).
|
||||||
Set("gorm:save_associations", false).
|
Set("gorm:save_associations", false).
|
||||||
InstanceSet("gorm:update_interface", values).
|
InstanceSet("gorm:update_interface", values).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user