mirror of https://github.com/go-gorm/gorm.git
Fix double pointer for where conditions, close #4159
This commit is contained in:
parent
14b9bd163c
commit
9fccb17d07
|
@ -339,6 +339,10 @@ func (stmt *Statement) BuildCondition(query interface{}, args ...interface{}) []
|
|||
}
|
||||
default:
|
||||
reflectValue := reflect.Indirect(reflect.ValueOf(arg))
|
||||
for reflectValue.Kind() == reflect.Ptr {
|
||||
reflectValue = reflectValue.Elem()
|
||||
}
|
||||
|
||||
if s, err := schema.Parse(arg, stmt.DB.cacheStore, stmt.DB.NamingStrategy); err == nil {
|
||||
selectedColumns := map[string]bool{}
|
||||
if idx == 0 {
|
||||
|
|
Loading…
Reference in New Issue