mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
[PR #849] [MERGED] Error with Same Field, Multiple Values, Criteria and QueryBuilder #8796
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/849
Author: @bsahlhof
Created: 11/18/2013
Status: ✅ Merged
Merged: 11/26/2013
Merged by: @guilhermeblanco
Base:
master← Head:master📝 Commits (2)
c2997b3Add ability to test same parameter name for multiple values.96fb0d7Changed logic to allow joining games, and becoming friends📊 Changes
2 files changed (+21 additions, -2 deletions)
View changed files
📝
lib/Doctrine/ORM/Query/QueryExpressionVisitor.php(+8 -0)📝
tests/Doctrine/Tests/ORM/QueryBuilderTest.php(+13 -2)📄 Description
I just posted another quick patch for this, but after reviewing some of the tests, I realized I needed to change it slightly.
The bug appeared when using same field for 2 different expression values within Criteria, then adding to QueryBuilder.
This makes sure the parameters are unique, avoiding the issue.
Example of issue:
Criteria of Field1 = Value1 OR (Field1 = Value2 AND field2 = true) passed to QueryBuilder
In this case, the parameter :Field1 was duplicated, throwing an error on evaluation of DQL.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.