Fix including ignored field in Where condition

This commit is contained in:
Constantin Schomburg 2015-05-09 13:12:13 +02:00
parent 25772352c2
commit a0c527f1cc
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@ func (scope *Scope) buildWhereCondition(clause map[string]interface{}) (str stri
case interface{}: case interface{}:
var sqls []string var sqls []string
for _, field := range scope.New(value).Fields() { 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()))) sqls = append(sqls, fmt.Sprintf("(%v = %v)", scope.Quote(field.DBName), scope.AddToVars(field.Field.Interface())))
} }
} }