forked from mirror/gorm
Fix duplicated instanceId in edge case
This commit is contained in:
parent
e2c989be17
commit
3e9c2d581f
2
scope.go
2
scope.go
|
@ -502,7 +502,7 @@ func (scope *Scope) Get(name string) (interface{}, bool) {
|
|||
// InstanceId get InstanceId for scope
|
||||
func (scope *Scope) InstanceId() string {
|
||||
if scope.instanceId == "" {
|
||||
scope.instanceId = fmt.Sprintf("%v", &scope)
|
||||
scope.instanceId = fmt.Sprintf("%v%v", &scope, &scope.db)
|
||||
}
|
||||
return scope.instanceId
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue