From d7237be63c594daefdcfea955c445179fa91f600 Mon Sep 17 00:00:00 2001 From: Jinzhu Date: Sun, 3 Jan 2016 20:27:08 +0800 Subject: [PATCH] Support poiner of time --- model_struct.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/model_struct.go b/model_struct.go index 204da5e7..aeda25f9 100644 --- a/model_struct.go +++ b/model_struct.go @@ -173,6 +173,9 @@ func (scope *Scope) GetModelStruct() *ModelStruct { } else if _, isTime := fieldValue.(*time.Time); isTime { // is time field.IsNormal = true + } else if _, isTime := fieldValue.(**time.Time); isTime { + // is time + field.IsNormal = true } else if _, ok := field.TagSettings["EMBEDDED"]; ok || fieldStruct.Anonymous { // is embedded struct for _, subField := range scope.New(fieldValue).GetStructFields() {