use NowFunc replace time.Now
This commit is contained in:
parent
fe553a7c1a
commit
0208f532e0
@ -6,7 +6,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"reflect"
|
"reflect"
|
||||||
"sort"
|
"sort"
|
||||||
"time"
|
|
||||||
|
|
||||||
"gorm.io/gorm/schema"
|
"gorm.io/gorm/schema"
|
||||||
"gorm.io/gorm/utils"
|
"gorm.io/gorm/utils"
|
||||||
@ -72,8 +71,8 @@ func (cs *callbacks) Raw() *processor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (p *processor) Execute(db *DB) {
|
func (p *processor) Execute(db *DB) {
|
||||||
curTime := time.Now()
|
|
||||||
stmt := db.Statement
|
stmt := db.Statement
|
||||||
|
curTime := db.NowFunc()
|
||||||
|
|
||||||
if stmt.Model == nil {
|
if stmt.Model == nil {
|
||||||
stmt.Model = stmt.Dest
|
stmt.Model = stmt.Dest
|
||||||
|
Loading…
x
Reference in New Issue
Block a user