Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-552

Colon (":") in field name treats like query parameter

    Details

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

      Description

      The colon sign (":") is permitted for columns' name but Doctrine treats them like parameters placeholder:

      SELECT `d.ns:col_name` FROM my_table d WHERE `d.date` >= :param1
      

      causes DBALException:

      An exception occurred while executing 'SELECT `d.ns:col_name` FROM my_table d WHERE `d.date` >= :param1' with params ["2013-06-24 14:22:18"]: Value for :col_name not found in params array. Params array key should be "col_name"
      

        Issue Links

          Activity

            People

            • Assignee:
              Steve Müller
              Reporter:
              Daniel Bojdo
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: