diff --git a/main.go b/main.go index 86301207..f39a373f 100644 --- a/main.go +++ b/main.go @@ -220,9 +220,7 @@ func (s *DB) Rows() (*sql.Rows, error) { } func (s *DB) Scan(dest interface{}) *DB { - scope := s.clone().NewScope(s.Value).InstanceSet("gorm:query_destination", dest) - Query(scope) - return scope.db + return s.clone().NewScope(s.Value).InstanceSet("gorm:query_destination", dest).callCallbacks(s.parent.callback.queries).db } func (s *DB) FirstOrInit(out interface{}, where ...interface{}) *DB { diff --git a/test_all.sh b/test_all.sh index bd28294d..6c5593b3 100755 --- a/test_all.sh +++ b/test_all.sh @@ -1,4 +1,4 @@ -dialects=("postgres" "foundation" "mysql" "sqlite") +dialects=("postgres" "mysql" "sqlite") for dialect in "${dialects[@]}" ; do GORM_DIALECT=${dialect} go test