mirror of https://github.com/go-gorm/gorm.git
Fix QuotedTableName
This commit is contained in:
parent
bab148f90c
commit
11f232a200
6
scope.go
6
scope.go
|
@ -218,7 +218,11 @@ func (scope *Scope) QuotedTableName() string {
|
|||
if scope.Search != nil && len(scope.Search.TableName) > 0 {
|
||||
return scope.Search.TableName
|
||||
} else {
|
||||
return scope.Quote(scope.TableName())
|
||||
keys := strings.Split(scope.TableName(), ".")
|
||||
for i, v := range keys {
|
||||
keys[i] = scope.Quote(v)
|
||||
}
|
||||
return strings.Join(keys, ".")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue