fix: 注释错误

Mr9esx 2020-07-15 18:08:06 +08:00
parent 1096c9ca9a
commit e4c3b3a4d0

@ -436,7 +436,7 @@ When updating with `Update`, `Updates`, You can use `Changed` method in Hooks `B
```go
func (user *User) BeforeUpdate(tx *gorm.DB) error {
if tx.Statement.Changed("Name", "Admin") { // if Name or Role changed
if tx.Statement.Changed("Name", "Admin") { // if Name or Admin changed
tx.Statement.SetColumn("Age", 18)
}