Modify: disable association_autoupdate in model.File.UpdateSourceName
This commit is contained in:
parent
e2488841b4
commit
d9cff24c75
1 changed files with 1 additions and 1 deletions
|
@ -196,7 +196,7 @@ func (file *File) UpdateSize(value uint64) error {
|
||||||
|
|
||||||
// UpdateSourceName 更新文件的源文件名
|
// UpdateSourceName 更新文件的源文件名
|
||||||
func (file *File) UpdateSourceName(value string) error {
|
func (file *File) UpdateSourceName(value string) error {
|
||||||
return DB.Model(&file).Update("source_name", value).Error
|
return DB.Model(&file).Set("gorm:association_autoupdate", false).Update("source_name", value).Error
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Reference in a new issue