forked from mirror/gorm
Merge pull request #1304 from gernest/patch-1
Fix *Scope.buildNotCondition
This commit is contained in:
commit
373207d546
3
scope.go
3
scope.go
|
@ -593,8 +593,9 @@ func (scope *Scope) buildNotCondition(clause map[string]interface{}) (str string
|
||||||
if reflect.ValueOf(value).Len() > 0 {
|
if reflect.ValueOf(value).Len() > 0 {
|
||||||
str = fmt.Sprintf("(%v.%v NOT IN (?))", scope.QuotedTableName(), scope.Quote(primaryKey))
|
str = fmt.Sprintf("(%v.%v NOT IN (?))", scope.QuotedTableName(), scope.Quote(primaryKey))
|
||||||
clause["args"] = []interface{}{value}
|
clause["args"] = []interface{}{value}
|
||||||
}
|
} else {
|
||||||
return ""
|
return ""
|
||||||
|
}
|
||||||
case map[string]interface{}:
|
case map[string]interface{}:
|
||||||
var sqls []string
|
var sqls []string
|
||||||
for key, value := range value {
|
for key, value := range value {
|
||||||
|
|
Loading…
Reference in New Issue