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
1 changed files with 1 additions and 1 deletions

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)
}