Commit d4d76219 authored by wy65701436's avatar wy65701436

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

parent 7b051e7a
......@@ -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)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment