forked from mirror/gorm
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:
|
default:
|
||||||
reflectValue := reflect.Indirect(reflect.ValueOf(arg))
|
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 {
|
if s, err := schema.Parse(arg, stmt.DB.cacheStore, stmt.DB.NamingStrategy); err == nil {
|
||||||
selectedColumns := map[string]bool{}
|
selectedColumns := map[string]bool{}
|
||||||
if idx == 0 {
|
if idx == 0 {
|
||||||
|
|
Loading…
Reference in New Issue