Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-555

Table name is not quoted despite being a reserved word and being quoted in the annotation

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5
    • Component/s: None
    • Security Level: All
    • Labels:
      None

      Description

      When a reserved word is used as a table name the migration does half the job as far as the quoting is concerned.

      The generated statement for the creation of the table doesn't work.
      It generated:

       
      CREATE TABLE Order .... # without quoting.
      

      But when the table name is a reference in a foreign key it's ok.

       
      ALTER TABLE Orders_Domains ADD CONSTRAINT FK_7FD78CA28D9F6D38 FOREIGN KEY (order_id) REFERENCES `Order` (id)
      
       
      /**
       * @ORM\Table(name="`Order`")
       * @ORM\Entity
       */
      class Order
      {
      }
      

      I suppose that at some point the table name is unquoted but I didn't find out where.

        Issue Links

          Activity

          mikeSimonson created issue -
          Marco Pivetta made changes -
          Field Original Value New Value
          Project Doctrine Migrations [ 10041 ] Doctrine DBAL [ 10040 ]
          Key DMIG-43 DBAL-555
          Workflow jira [ 21491 ] jira-feedback3 [ 21492 ]
          Security All [ 10000 ]
          Hide
          Steve Müller added a comment -

          Can you please tell which platform/driver you are using? Also the DBAL version would help tracking this down. But there has been done a lot of work concerning identifier quotation in the last months already so maybe this is already solved by 2.4?
          Can you please reinvestigate? Thanks.

          Show
          Steve Müller added a comment - Can you please tell which platform/driver you are using? Also the DBAL version would help tracking this down. But there has been done a lot of work concerning identifier quotation in the last months already so maybe this is already solved by 2.4? Can you please reinvestigate? Thanks.
          Hide
          mikeSimonson added a comment -

          Hi,

          I was using doctrine-migration with the dbal 2.3.4.
          How can I test for that before doctrine migration upgrade to the dbal 2.4

          Thanks

          Show
          mikeSimonson added a comment - Hi, I was using doctrine-migration with the dbal 2.3.4. How can I test for that before doctrine migration upgrade to the dbal 2.4 Thanks
          Benjamin Eberlei made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 2.5 [ 10523 ]
          Resolution Fixed [ 1 ]
          Steve Müller made changes -
          Link This issue is duplicated by DBAL-802 [ DBAL-802 ]

          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={query=DBAL-555, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

            People

            • Assignee:
              Benjamin Eberlei
              Reporter:
              mikeSimonson
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: