diff --git a/schema/schema.go b/schema/schema.go index 3791237d..e018d4fe 100644 --- a/schema/schema.go +++ b/schema/schema.go @@ -229,7 +229,7 @@ func ParseWithSpecialTableName(dest interface{}, cacheStore *sync.Map, namer Nam } if field := schema.PrioritizedPrimaryField; field != nil { - switch field.GORMDataType { + switch field.DataType { case Int, Uint: if _, ok := field.TagSettings["AUTOINCREMENT"]; !ok { if !field.HasDefaultValue || field.DefaultValueInterface != nil {