[DDC-1721] LIKE clausule should accept functions on the pattern Created: 21/Mar/12 Updated: 24/Jan/13 |
|
| Status: | Open |
| Project: | Doctrine 2 - ORM |
| Component/s: | ORM |
| Affects Version/s: | 2.1.6 |
| Fix Version/s: | None |
| Security Level: | All |
| Type: | Improvement | Priority: | Major |
| Reporter: | Ignacio Larranaga | Assignee: | Benjamin Eberlei |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
Example: should be a valid SQL, now is rejected because the walker only accept a variable or an string expression. I'm adding a patch to address this. |
| Comments |
| Comment by Ignacio Larranaga [ 21/Mar/12 ] |
|
Sorry the Parser has to be modified also to allow expressions to be recognized, I'm attaching the necessary patch. |
| Comment by Benjamin Eberlei [ 22/Mar/12 ] |
|
I am sure there is a reason why the walker doesn't accept this such as not all supported vendors allowing functions in right hand side LIKE expressions, but i am not sure about this. |
| Comment by Glen Ainscow [ 03/Oct/12 ] |
|
This is not possible either: WHERE CASE WHEN p.name IS NULL THEN u.username ELSE p.name END LIKE :name |
| Comment by Thomas Mayer [ 24/Jan/13 ] |
|
In my case it worked when using "=" instead of "LIKE". //works: //[Syntax Error] line 0, col 1217: Error: Expected =, <, <=, <>, >, >=, !=, got 'LIKE' So the LIKE operator only needs to be allowed here. I'm wondering which vendor should not be able to handle that: |