mirror of https://github.com/go-gorm/gorm.git
Use Get to replace InstanceGet
This commit is contained in:
parent
dc55c59b84
commit
c2dda88f9a
|
@ -23,7 +23,7 @@ func Query(scope *Scope) {
|
|||
}
|
||||
|
||||
var dest = scope.IndirectValue()
|
||||
if value, ok := scope.InstanceGet("gorm:query_destination"); ok {
|
||||
if value, ok := scope.Get("gorm:query_destination"); ok {
|
||||
dest = reflect.Indirect(reflect.ValueOf(value))
|
||||
}
|
||||
|
||||
|
|
2
main.go
2
main.go
|
@ -212,7 +212,7 @@ func (s *DB) Find(out interface{}, where ...interface{}) *DB {
|
|||
}
|
||||
|
||||
func (s *DB) Scan(dest interface{}) *DB {
|
||||
return s.clone().NewScope(s.Value).InstanceSet("gorm:query_destination", dest).callCallbacks(s.parent.callback.queries).db
|
||||
return s.clone().NewScope(s.Value).Set("gorm:query_destination", dest).callCallbacks(s.parent.callback.queries).db
|
||||
}
|
||||
|
||||
func (s *DB) Row() *sql.Row {
|
||||
|
|
Loading…
Reference in New Issue