feat article update排除关联
This commit is contained in:
parent
c11ffddef8
commit
1e6dddc0b0
@ -53,7 +53,7 @@ func (a *articleApi) Update(article v2.Article, selects ...string) error {
|
|||||||
if len(selects) > 0 {
|
if len(selects) > 0 {
|
||||||
selects = []string{"remark", "exclude"}
|
selects = []string{"remark", "exclude"}
|
||||||
}
|
}
|
||||||
return a.db.Model(&article).Select(selects).Updates(article).Error
|
return a.db.Model(&article).Select(selects).Omit(clause.Associations).Updates(article).Error
|
||||||
}
|
}
|
||||||
|
|
||||||
// ******************Find和List
|
// ******************Find和List
|
||||||
|
Loading…
Reference in New Issue
Block a user