mirror of https://github.com/go-gorm/gorm.git
Describe name of field for invalid SQL datatypes (#2689)
This commit is contained in:
parent
820b5f244a
commit
d2007b3c82
|
@ -120,7 +120,7 @@ func (s *mysql) DataTypeOf(field *StructField) string {
|
|||
}
|
||||
|
||||
if sqlType == "" {
|
||||
panic(fmt.Sprintf("invalid sql type %s (%s) for mysql", dataValue.Type().Name(), dataValue.Kind().String()))
|
||||
panic(fmt.Sprintf("invalid sql type %s (%s) in field %s for mysql", dataValue.Type().Name(), dataValue.Kind().String(), field.Name))
|
||||
}
|
||||
|
||||
if strings.TrimSpace(additionalType) == "" {
|
||||
|
|
Loading…
Reference in New Issue