1
0
mirror of https://github.com/astaxie/beego.git synced 2024-06-17 14:23:33 +00:00

modify the error log for registerModel to tell user the default hard code PK is 'id'.

This commit is contained in:
wy65701436 2016-05-27 02:03:58 -07:00
parent 7b051e7ad1
commit d4d7621942

View File

@ -66,7 +66,7 @@ func registerModel(prefix string, model interface{}) {
}
if info.fields.pk == nil {
fmt.Printf("<orm.RegisterModel> `%s` need a primary key field\n", name)
fmt.Printf("<orm.RegisterModel> `%s` need a primary key field, default use 'id' if not set\n", name)
os.Exit(2)
}