mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
[PR #245] [MERGED] [DDC-1572] Allow LIKE pattern to be a function or path expression #7908
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/doctrine/orm/pull/245
Author: @milokmet
Created: 12/29/2011
Status: ✅ Merged
Merged: 12/31/2011
Merged by: @guilhermeblanco
Base:
master← Head:DDC-1572📝 Commits (1)
ae4321b[DDC-1572] Allow LIKE pattern to be a function or path expression📊 Changes
3 files changed (+21 additions, -3 deletions)
View changed files
📝
lib/Doctrine/ORM/Query/Parser.php(+2 -3)📝
lib/Doctrine/ORM/Query/SqlWalker.php(+4 -0)📝
tests/Doctrine/Tests/ORM/Query/SelectSqlGenerationTest.php(+15 -0)📄 Description
I fix like expression parser as well as SqlWalker to allow the pattern to be a function or path expression (another column for example joined column), to allow such where conditions:
LOWER(u.field) LIKE LOWER(?1) or with joined tables - log.messages LIKE alert.pattern
I do not know if I fixed that in the correct way, because I am not familiar with Doctrine2 query parsers and lexers.
I've created also few test cases for that and it works.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.