Make exec works with plugin system

This commit is contained in:
Jinzhu 2014-01-28 10:29:12 +08:00
parent 7bebf685f4
commit 7a99f37ba4
1 changed files with 3 additions and 1 deletions

View File

@ -207,7 +207,9 @@ func (s *DB) Raw(sql string, values ...interface{}) *DB {
} }
func (s *DB) Exec(sql string, values ...interface{}) *DB { func (s *DB) Exec(sql string, values ...interface{}) *DB {
return s.clone().do(nil).raw(sql, values...).exec().db scope := s.clone().NewScope(nil)
scope.Raw(scope.buildWhereCondition(map[string]interface{}{"query": sql, "args": values}))
return scope.Exec().db
} }
func (s *DB) Model(value interface{}) *DB { func (s *DB) Model(value interface{}) *DB {