Support poiner of time

This commit is contained in:
Jinzhu 2016-01-03 20:27:08 +08:00
parent 52ac75a29a
commit d7237be63c
1 changed files with 3 additions and 0 deletions

View File

@ -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() {