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.

        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 ]
        Benjamin Eberlei made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.5 [ 10523 ]
        Resolution Fixed [ 1 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: