Fix QuotedTableName

This commit is contained in:
Jinzhu 2014-06-10 13:08:19 +08:00
parent bab148f90c
commit 11f232a200
1 changed files with 5 additions and 1 deletions

View File

@ -218,7 +218,11 @@ func (scope *Scope) QuotedTableName() string {
if scope.Search != nil && len(scope.Search.TableName) > 0 { if scope.Search != nil && len(scope.Search.TableName) > 0 {
return scope.Search.TableName return scope.Search.TableName
} else { } 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, ".")
} }
} }