Fix default tag not working in embedded schema (#3451)
This commit is contained in:
parent
70a7bd52ca
commit
2a9062dd26
@ -356,9 +356,7 @@ func (schema *Schema) ParseField(fieldStruct reflect.StructField) *Field {
|
||||
ef.AutoIncrement = false
|
||||
}
|
||||
|
||||
if ef.DefaultValue == "" {
|
||||
ef.HasDefaultValue = false
|
||||
}
|
||||
_, ef.HasDefaultValue = ef.TagSettings["DEFAULT"]
|
||||
}
|
||||
|
||||
for k, v := range field.TagSettings {
|
||||
|
Loading…
x
Reference in New Issue
Block a user