Skip to content

Commit

Permalink
Fix including ignored field in Where condition
Browse files Browse the repository at this point in the history
  • Loading branch information
cschomburg committed May 9, 2015
1 parent 2577235 commit a0c527f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scope_private.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())))
}
}
Expand Down

0 comments on commit a0c527f

Please sign in to comment.