mirror of https://github.com/go-gorm/gorm.git
Fix use []byte as condtions
This commit is contained in:
parent
d7237be63c
commit
caeb4040f2
|
@ -49,7 +49,7 @@ func (scope *Scope) buildWhereCondition(clause map[string]interface{}) (str stri
|
|||
switch reflect.ValueOf(arg).Kind() {
|
||||
case reflect.Slice: // For where("id in (?)", []int64{1,2})
|
||||
if bytes, ok := arg.([]byte); ok {
|
||||
scope.AddToVars(bytes)
|
||||
str = strings.Replace(str, "?", scope.AddToVars(bytes), 1)
|
||||
} else {
|
||||
values := reflect.ValueOf(arg)
|
||||
var tempMarks []string
|
||||
|
|
Loading…
Reference in New Issue