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
|
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 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user