diff --git a/model_struct.go b/model_struct.go index 6df615d1..c1885eae 100644 --- a/model_struct.go +++ b/model_struct.go @@ -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 {