fix can't get some filed

fix can't get some filed
This commit is contained in:
Kun 2016-02-16 00:24:11 +08:00
parent aa45da1542
commit 56356759aa

View File

@ -64,7 +64,7 @@ func (scope *Scope) Fields() map[string]*Field {
indirectValue := scope.IndirectValue()
isStruct := indirectValue.Kind() == reflect.Struct
for _, structField := range modelStruct.StructFields {
if field, ok := fields[structField.DBName]; !ok || field.IsIgnored {
if field, ok := fields[structField.DBName]; !ok || !field.IsIgnored {
if isStruct {
fields[structField.DBName] = getField(indirectValue, structField)
} else {