mirror of https://github.com/go-gorm/gorm.git
Make exec works with plugin system
This commit is contained in:
parent
7bebf685f4
commit
7a99f37ba4
4
main.go
4
main.go
|
@ -207,7 +207,9 @@ func (s *DB) Raw(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 {
|
||||
|
|
Loading…
Reference in New Issue