Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2435

Column name with number and reserved character creates invalid query

    Details

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

      Description

      I have a column name called 1:1 which i map like so
      @Column(type="string", name="`1:1`")
      Unfortunately, the SQL that get generated does not work in mysql:
      SELECT t0.`1:1` AS 112 FROM `table` t0
      the problem is with the 'AS 112', if it contained a letter eg. 11a, or was escaped eg. `112` it wound work.

        Activity

        Show
        Fabio B. Silva added a comment - Fixed : https://github.com/doctrine/doctrine2/commit/c9d9b68fa9937218aad05dfca4b3f96b409cfc8e

          People

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

            Dates

            • Created:
              Updated:
              Resolved: