Skip to content

Commit

Permalink
slightly better callback warning (go-gorm#4495)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdemirpolat authored Jul 13, 2021
1 parent 80497f2 commit 0329b80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion schema/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ func Parse(dest interface{}, cacheStore *sync.Map, namer Namer) (*Schema, error)
case "func(*gorm.DB) error": // TODO hack
reflect.Indirect(reflect.ValueOf(schema)).FieldByName(name).SetBool(true)
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)
}
}
}
Expand Down

0 comments on commit 0329b80

Please sign in to comment.