Fix default tag not working in embedded schema (#3451)

This commit is contained in:
rocinantex 2020-09-11 11:07:39 +08:00
parent 70a7bd52ca
commit 2a9062dd26

View File

@ -356,9 +356,7 @@ func (schema *Schema) ParseField(fieldStruct reflect.StructField) *Field {
ef.AutoIncrement = false ef.AutoIncrement = false
} }
if ef.DefaultValue == "" { _, ef.HasDefaultValue = ef.TagSettings["DEFAULT"]
ef.HasDefaultValue = false
}
} }
for k, v := range field.TagSettings { for k, v := range field.TagSettings {