Doctrine 1
  1. Doctrine 1
  2. DC-799

Doctrine_Query::parseFunctionExpression() produces unexpected results if the expression contains a function

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.2
    • Fix Version/s: 1.2.2
    • Component/s: Query
    • Labels:
      None
    • Environment:
      Mac OS X, LINUX

      Description

      When Doctrine_Query::parseFunctionExpression() is called with the following parameter and $this->_conn->expression is of type Doctrine_Expression_MySql:

      $expr = "DATE_FORMAT(datefield,'%Y-%m-%d'),someotherfield"

      The expected result from Doctrine_Query::parseFunctionExpressoin() would be

      DATE_FORMAT(l.datefield,'%Y-%m-%d'),l.someotherfield

      However, the actual result is

      DATE_FORMAT(l.datefield,'%Y-%m-%d'),someotherfiel

      Note the missing leading "l." and the last character ("d") on "someotherfield".
      Obviously this leads to fatal errors.

      This example is a result of calling addGroupby("DATE_FORMAT(datefield,'%Y-%m-%d'),someotherfield") on a Doctrine_Query object.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Guilherme Blanco
            Reporter:
            Henning Glatter-Gotz
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: