Fix duplicated instanceId in edge case

This commit is contained in:
Jinzhu 2015-01-26 17:59:31 +08:00
parent e2c989be17
commit 3e9c2d581f
1 changed files with 1 additions and 1 deletions

View File

@ -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
}