Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-3148

ResultSetMappingBuilder::generateSelectClause ignores quoted column names

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: Git Master
    • Fix Version/s: None
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      If an entity has a quoted column (Magic Words etc.) and you want to use "generateSelectClause" for the specific entity it won't return the quoted name, just the plain name. If the name is a SQL Magic Word the corresponding SQL will fail.

      Exp.: "profile.real" (wrong) instead of "profile.`real`".

      File: Doctrine/ORM/Query/ResultSetMappingBuilder.php
      Function: generateSelectClause

      Line 445:
      $sql .= " AS " . $columnName;

      Example Entity:
      ...
      class Profile

      { /** * @ORM\Column(name="`real`", type="boolean") */ protected $real=false; }

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Christian Ruhstaller
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: