mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 22:20:54 +00:00
Merge pull request #1968 from wy65701436/develop
modify the error log for registerModel.
This commit is contained in:
commit
1fe2226c11
@ -66,7 +66,7 @@ func registerModel(prefix string, model interface{}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if info.fields.pk == nil {
|
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)
|
os.Exit(2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user