From 8a2b73723d7c78a358cee3a1e2f20a04c37098e0 Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Thu, 1 Oct 2015 08:06:08 +0800 Subject: [PATCH] Better compatibility for complex sql type --- model_struct.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/model_struct.go b/model_struct.go index bafea8e8..6a9a37ec 100644 --- a/model_struct.go +++ b/model_struct.go @@ -461,8 +461,8 @@ func parseTagSetting(str string) map[string]string { for _, value := range tags { v := strings.Split(value, ":") k := strings.TrimSpace(strings.ToUpper(v[0])) - if len(v) == 2 { - setting[k] = v[1] + if len(v) >= 2 { + setting[k] = strings.Join(v[1:], ":") } else { setting[k] = k }