[PR #584] [CLOSED] QueryBuilder::addCriteria improvements #8406

Closed
opened 2026-01-22 15:59:47 +01:00 by admin · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/584
Author: @chEbba
Created: 2/19/2013
Status: Closed

Base: masterHead: query-expression-visitor-improvements


📝 Commits (1)

  • 59a3780 Fix problem with different comparisons on the same field in QueryExpressionVisitor.

📊 Changes

4 files changed (+188 additions, -50 deletions)

View changed files

📝 lib/Doctrine/ORM/Query/QueryExpressionVisitor.php (+121 -21)
📝 lib/Doctrine/ORM/QueryBuilder.php (+6 -5)
📝 tests/Doctrine/Tests/ORM/Query/QueryExpressionVisitorTest.php (+56 -19)
📝 tests/Doctrine/Tests/ORM/QueryBuilderTest.php (+5 -5)

📄 Description

  1. Fix problem with different comparisons on the same field in QueryExpressonVisitor (now index value is added).
  2. Add criteria field aliasing. Usually oject criteria has "filed = value" notation while DQL has "alias.field = value".
    First level fields are added with alias, second+ level fields (object.field, parent.object.field) are truncated to the second level (object.field) without alias. Alias map can be implemented in future.

🔄 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/584 **Author:** [@chEbba](https://github.com/chEbba) **Created:** 2/19/2013 **Status:** ❌ Closed **Base:** `master` ← **Head:** `query-expression-visitor-improvements` --- ### 📝 Commits (1) - [`59a3780`](https://github.com/doctrine/orm/commit/59a3780acbf0a40814dab36ff20419b0cdc76ee4) Fix problem with different comparisons on the same field in QueryExpressionVisitor. ### 📊 Changes **4 files changed** (+188 additions, -50 deletions) <details> <summary>View changed files</summary> 📝 `lib/Doctrine/ORM/Query/QueryExpressionVisitor.php` (+121 -21) 📝 `lib/Doctrine/ORM/QueryBuilder.php` (+6 -5) 📝 `tests/Doctrine/Tests/ORM/Query/QueryExpressionVisitorTest.php` (+56 -19) 📝 `tests/Doctrine/Tests/ORM/QueryBuilderTest.php` (+5 -5) </details> ### 📄 Description 1. Fix problem with different comparisons on the same field in QueryExpressonVisitor (now index value is added). 2. Add criteria field aliasing. Usually oject criteria has "filed = value" notation while DQL has "alias.field = value". First level fields are added with alias, second+ level fields (object.field, parent.object.field) are truncated to the second level (object.field) without alias. Alias map can be implemented in future. --- <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:59:47 +01:00
admin closed this issue 2026-01-22 15:59:47 +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#8406