[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


 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.



 Comments   
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
https://github.com/doctrine/doctrine2/pull/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:
https://github.com/doctrine/dbal/pull/245

Generated at Fri Oct 31 10:06:02 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.