try to fix too much updates
This commit is contained in:
parent
8417729f4b
commit
410393c804
@ -441,7 +441,7 @@ func (db *DB) UpdateFields(fields ...string) *DB {
|
||||
sets[db.C(db.Value, field)] = m.FieldByName(field).Interface()
|
||||
}
|
||||
|
||||
return db.clone().Set("gorm:save_associations", false).Update(sets)
|
||||
return db.clone().Set("gorm:save_associations", false).Set("gorm:association_save_reference", false).Update(sets)
|
||||
}
|
||||
|
||||
func (db *DB) SelectFields(fields ...string) *DB {
|
||||
|
Loading…
x
Reference in New Issue
Block a user