mirror of
https://github.com/astaxie/beego.git
synced 2024-12-23 07:00:49 +00:00
modify the error log for registerModel to tell user the default hard code PK is 'id'.
This commit is contained in:
parent
7b051e7ad1
commit
d4d7621942
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user