[PR #245] [MERGED] [DDC-1572] Allow LIKE pattern to be a function or path expression #7908

Open
opened 2026-01-22 15:57:31 +01:00 by admin · 0 comments
Owner

📋 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: masterHead: 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.

## 📋 Pull Request Information **Original PR:** https://github.com/doctrine/orm/pull/245 **Author:** [@milokmet](https://github.com/milokmet) **Created:** 12/29/2011 **Status:** ✅ Merged **Merged:** 12/31/2011 **Merged by:** [@guilhermeblanco](https://github.com/guilhermeblanco) **Base:** `master` ← **Head:** `DDC-1572` --- ### 📝 Commits (1) - [`ae4321b`](https://github.com/doctrine/orm/commit/ae4321b4e300b4f45194552a3c748ca1558ecce0) [DDC-1572] Allow LIKE pattern to be a function or path expression ### 📊 Changes **3 files changed** (+21 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `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) </details> ### 📄 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
admin added the pull-request label 2026-01-22 15:57:31 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#7908