From d4d7621942907818d40e51f61576f20bfaa51d91 Mon Sep 17 00:00:00 2001 From: wy65701436 Date: Fri, 27 May 2016 02:03:58 -0700 Subject: [PATCH] modify the error log for registerModel to tell user the default hard code PK is 'id'. --- orm/models_boot.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orm/models_boot.go b/orm/models_boot.go index 3690557b..c9905330 100644 --- a/orm/models_boot.go +++ b/orm/models_boot.go @@ -66,7 +66,7 @@ func registerModel(prefix string, model interface{}) { } if info.fields.pk == nil { - fmt.Printf(" `%s` need a primary key field\n", name) + fmt.Printf(" `%s` need a primary key field, default use 'id' if not set\n", name) os.Exit(2) }