forked from mirror/gorm
Support poiner of time
This commit is contained in:
parent
52ac75a29a
commit
d7237be63c
|
@ -173,6 +173,9 @@ func (scope *Scope) GetModelStruct() *ModelStruct {
|
||||||
} else if _, isTime := fieldValue.(*time.Time); isTime {
|
} else if _, isTime := fieldValue.(*time.Time); isTime {
|
||||||
// is time
|
// is time
|
||||||
field.IsNormal = true
|
field.IsNormal = true
|
||||||
|
} else if _, isTime := fieldValue.(**time.Time); isTime {
|
||||||
|
// is time
|
||||||
|
field.IsNormal = true
|
||||||
} else if _, ok := field.TagSettings["EMBEDDED"]; ok || fieldStruct.Anonymous {
|
} else if _, ok := field.TagSettings["EMBEDDED"]; ok || fieldStruct.Anonymous {
|
||||||
// is embedded struct
|
// is embedded struct
|
||||||
for _, subField := range scope.New(fieldValue).GetStructFields() {
|
for _, subField := range scope.New(fieldValue).GetStructFields() {
|
||||||
|
|
Loading…
Reference in New Issue