forked from mirror/gorm
Fix ignore fields
This commit is contained in:
parent
5174cc5c24
commit
465f8ea05b
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue