forked from mirror/gorm
Merge pull request #64 from fuzzac/master
Fixed double logging of UPDATE and DELETE commands.
This commit is contained in:
commit
0156c26cfa
|
@ -10,8 +10,6 @@ func BeforeDelete(scope *Scope) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Delete(scope *Scope) {
|
func Delete(scope *Scope) {
|
||||||
defer scope.Trace(time.Now())
|
|
||||||
|
|
||||||
if !scope.HasError() {
|
if !scope.HasError() {
|
||||||
if !scope.Search.Unscope && scope.HasColumn("DeletedAt") {
|
if !scope.Search.Unscope && scope.HasColumn("DeletedAt") {
|
||||||
scope.Raw(
|
scope.Raw(
|
||||||
|
|
|
@ -41,8 +41,6 @@ func UpdateTimeStampWhenUpdate(scope *Scope) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Update(scope *Scope) {
|
func Update(scope *Scope) {
|
||||||
defer scope.Trace(time.Now())
|
|
||||||
|
|
||||||
if !scope.HasError() {
|
if !scope.HasError() {
|
||||||
var sqls []string
|
var sqls []string
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue