Uploaded image for project: 'Doctrine DBAL'
  1. Doctrine DBAL
  2. DBAL-129

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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: 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

        pschwisow Patrick Schwisow created issue -
        Hide
        beberlei Benjamin Eberlei added a comment -

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

        Show
        beberlei Benjamin Eberlei added a comment - Just use `foo` as quotes, its just an abstract concept, doctrine will translate that to [foo] in MsSQL.
        beberlei Benjamin Eberlei made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Invalid [ 6 ]
        Hide
        pschwisow 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
        pschwisow 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.
        pschwisow Patrick Schwisow made changes -
        Resolution Invalid [ 6 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        beberlei Benjamin Eberlei added a comment -

        Assigned to Juokaz

        Show
        beberlei Benjamin Eberlei added a comment - Assigned to Juokaz
        beberlei Benjamin Eberlei made changes -
        Assignee Benjamin Eberlei [ beberlei ] Juozas Kaziukenas [ juokaz ]
        Hide
        beberlei Benjamin Eberlei added a comment -

        Fixed

        Show
        beberlei Benjamin Eberlei added a comment - Fixed
        beberlei Benjamin Eberlei made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Fix Version/s 2.0.6 [ 10140 ]
        Resolution Fixed [ 1 ]
        beberlei Benjamin Eberlei made changes -
        Project Doctrine 2 - ORM [ 10032 ] Doctrine DBAL [ 10040 ]
        Key DDC-1202 DBAL-129
        Affects Version/s 2.0.4 [ 10131 ]
        Affects Version/s 2.0.4 [ 10130 ]
        Component/s ORM [ 10012 ]
        Fix Version/s 2.0.6 [ 10141 ]
        Fix Version/s 2.0.6 [ 10140 ]
        beberlei Benjamin Eberlei made changes -
        Workflow jira [ 12707 ] jira-feedback2 [ 17724 ]
        beberlei Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 17724 ] jira-feedback3 [ 20079 ]

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={expand=changesets[0:20].revisions[0:29],reviews, query=DBAL-129}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

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

            Dates

            • Created:
              Updated:
              Resolved: