Skip to content

Commit

Permalink
Fix ignore fields
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzhu committed May 2, 2016
1 parent 5174cc5 commit 465f8ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model_struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func (scope *Scope) GetModelStruct() *ModelStruct {
}

// is ignored field
if fieldStruct.Tag.Get("sql") == "-" {
if _, ok := field.TagSettings["-"]; ok {
field.IsIgnored = true
} else {
if _, ok := field.TagSettings["PRIMARY_KEY"]; ok {
Expand Down

0 comments on commit 465f8ea

Please sign in to comment.