diff --git a/callback_query.go b/callback_query.go index 825caac1..59022eba 100644 --- a/callback_query.go +++ b/callback_query.go @@ -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)) } diff --git a/main.go b/main.go index 04f59bcf..bf8acbae 100644 --- a/main.go +++ b/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 {