mirror of https://github.com/go-gorm/gorm.git
slightly better callback warning (#4495)
This commit is contained in:
parent
80497f27a6
commit
0329b800b0
|
@ -228,7 +228,7 @@ func Parse(dest interface{}, cacheStore *sync.Map, namer Namer) (*Schema, error)
|
||||||
case "func(*gorm.DB) error": // TODO hack
|
case "func(*gorm.DB) error": // TODO hack
|
||||||
reflect.Indirect(reflect.ValueOf(schema)).FieldByName(name).SetBool(true)
|
reflect.Indirect(reflect.ValueOf(schema)).FieldByName(name).SetBool(true)
|
||||||
default:
|
default:
|
||||||
logger.Default.Warn(context.Background(), "Model %v don't match %vInterface, should be %v(*gorm.DB)", schema, name, name)
|
logger.Default.Warn(context.Background(), "Model %v don't match %vInterface, should be `%v(*gorm.DB) error`. Please see https://gorm.io/docs/hooks.html", schema, name, name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue