forked from mirror/gorm
Don't access scanner's fields if already defined data type
This commit is contained in:
parent
55945afb34
commit
58e34726df
|
@ -94,6 +94,7 @@ var ParseFieldStructForDialect = func(field *StructField, dialect Dialect) (fiel
|
|||
}
|
||||
|
||||
// Get scanner's real value
|
||||
if dataType == "" {
|
||||
var getScannerValue func(reflect.Value)
|
||||
getScannerValue = func(value reflect.Value) {
|
||||
fieldValue = value
|
||||
|
@ -102,6 +103,7 @@ var ParseFieldStructForDialect = func(field *StructField, dialect Dialect) (fiel
|
|||
}
|
||||
}
|
||||
getScannerValue(fieldValue)
|
||||
}
|
||||
|
||||
// Default Size
|
||||
if num, ok := field.TagSettings["SIZE"]; ok {
|
||||
|
|
Loading…
Reference in New Issue