[DDC-1572] LIKE expressions doesn't allow the matching pattern to be a string function Created: 29/Dec/11  Updated: 11/Feb/14  Resolved: 31/Dec/11

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: DQL
Affects Version/s: Git Master
Fix Version/s: 2.3
Security Level: All

Type: Improvement Priority: Major
Reporter: Miloslav "adrive" Kmet Assignee: Guilherme Blanco
Resolution: Fixed Votes: 0
Labels: None


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.

Comment by Benjamin Eberlei [ 29/Dec/11 ]

Assigned to Guilherme

Comment by Benjamin Eberlei [ 29/Dec/11 ]

This issue is referenced in Github Pull-Request GH-245

Comment by Benjamin Eberlei [ 31/Dec/11 ]

This was merged

Comment by Doctrine Bot [ 11/Feb/14 ]

A related Github Pull-Request [GH-245] was closed:

Generated at Mon Nov 30 14:01:11 EST 2015 using JIRA 6.4.10#64025-sha1:5b8b74079161cd76a20ab66dda52747ee6701bd6.