mirror of https://github.com/go-gorm/gorm.git
Fix including ignored field in Where condition
This commit is contained in:
parent
25772352c2
commit
a0c527f1cc
|
@ -38,7 +38,7 @@ func (scope *Scope) buildWhereCondition(clause map[string]interface{}) (str stri
|
|||
case interface{}:
|
||||
var sqls []string
|
||||
for _, field := range scope.New(value).Fields() {
|
||||
if !field.IsBlank {
|
||||
if !field.IsIgnored && !field.IsBlank {
|
||||
sqls = append(sqls, fmt.Sprintf("(%v = %v)", scope.Quote(field.DBName), scope.AddToVars(field.Field.Interface())))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue