Remove the uncessary reflect.Ptr

This commit is contained in:
Jinzhu 2021-01-27 11:24:34 +08:00
parent ba59065024
commit 81aa949105
1 changed files with 1 additions and 1 deletions

View File

@ -191,7 +191,7 @@ func Scan(rows *sql.Rows, db *DB, initialized bool) {
db.Statement.ReflectValue.Set(reflect.Append(db.Statement.ReflectValue, elem.Elem()))
}
}
case reflect.Struct, reflect.Ptr:
case reflect.Struct:
if db.Statement.ReflectValue.Type() != Schema.ModelType {
Schema, _ = schema.Parse(db.Statement.Dest, db.cacheStore, db.NamingStrategy)
}