Fix ignore fields

This commit is contained in:
Jinzhu 2016-05-02 19:34:11 +08:00
parent 5174cc5c24
commit 465f8ea05b
1 changed files with 1 additions and 1 deletions

View File

@ -157,7 +157,7 @@ func (scope *Scope) GetModelStruct() *ModelStruct {
} }
// is ignored field // is ignored field
if fieldStruct.Tag.Get("sql") == "-" { if _, ok := field.TagSettings["-"]; ok {
field.IsIgnored = true field.IsIgnored = true
} else { } else {
if _, ok := field.TagSettings["PRIMARY_KEY"]; ok { if _, ok := field.TagSettings["PRIMARY_KEY"]; ok {