Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-129

Doctrine\ORM\Mapping\ClassMetadataInfo does not properly handle identifier quoting

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.4
    • Fix Version/s: 2.0.6
    • Component/s: None
    • Labels:
      None

      Description

      Several methods in Doctrine\ORM\Mapping\ClassMetadataInfo assume that table names and field names may be quoted. In all places, logic assumes that the quote character will always be ` (backtick). There seems to be no way to properly quote table names with [] (square brackets) when working with SQL Server databases.

        Activity

        Hide
        Benjamin Eberlei added a comment -

        Just use `foo` as quotes, its just an abstract concept, doctrine will translate that to [foo] in MsSQL.

        Show
        Benjamin Eberlei added a comment - Just use `foo` as quotes, its just an abstract concept, doctrine will translate that to [foo] in MsSQL.
        Hide
        Patrick Schwisow added a comment -

        I don't see how that would work. It appears that DBAL\Platforms\AbstractPlatform::quoteIdentifier assumes that the opening and closing quotes are the same. In the case of MS SQL, it appears to use the double quote, not square brackets.

        Show
        Patrick Schwisow added a comment - I don't see how that would work. It appears that DBAL\Platforms\AbstractPlatform::quoteIdentifier assumes that the opening and closing quotes are the same. In the case of MS SQL, it appears to use the double quote, not square brackets.
        Hide
        Benjamin Eberlei added a comment -

        Assigned to Juokaz

        Show
        Benjamin Eberlei added a comment - Assigned to Juokaz
        Hide
        Benjamin Eberlei added a comment -

        Fixed

        Show
        Benjamin Eberlei added a comment - Fixed

          People

          • Assignee:
            Juozas Kaziukenas
            Reporter:
            Patrick Schwisow
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: