Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1572

LIKE expressions doesn't allow the matching pattern to be a string function

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Git Master
    • Fix Version/s: 2.3
    • Component/s: DQL
    • Security Level: All
    • Labels:
      None

      Description

      Like expressions doesn't allow the matching apttern to be a function returning string like LOWER(column) LIKE LOWER(:param)

      Query parsers is returning exception like this:

      [Syntax Error] line 0, col 82: Error: Expected Doctrine\ORM\Query\Lexer::T_STRING, got 'LOWER'

      It is not possible to construct queries like this:

      SELECT u.name FROM Doctrine\Tests\Models\CMS\CmsUser u WHERE UPPER(u.name) LIKE UPPER(:str)

      I'll create a pull request on github for this issue.

        Activity

          People

          • Assignee:
            Guilherme Blanco
            Reporter:
            Miloslav "adrive" Kmet
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: