feat article update排除关联

This commit is contained in:
timerzz 2024-09-05 21:11:00 +08:00
parent c11ffddef8
commit 1e6dddc0b0

View File

@ -53,7 +53,7 @@ func (a *articleApi) Update(article v2.Article, selects ...string) error {
if len(selects) > 0 {
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