diff --git a/scope.go b/scope.go index b6a6c27e..77268a35 100644 --- a/scope.go +++ b/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, ".") } }