DDC-2798: [GH-849] Error with Same Field, Multiple Values, Criteria and QueryBuilder #3501

Closed
opened 2026-01-22 14:21:10 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (Nov 18, 2013).

Originally assigned to: @guilhermeblanco on GitHub.

Jira issue originally created by user @doctrinebot:

This issue is created automatically through a Github pull request on behalf of bsahlhof:

Url: https://github.com/doctrine/doctrine2/pull/849

Message:

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.

Originally created by @doctrinebot on GitHub (Nov 18, 2013). Originally assigned to: @guilhermeblanco on GitHub. Jira issue originally created by user @doctrinebot: This issue is created automatically through a Github pull request on behalf of bsahlhof: Url: https://github.com/doctrine/doctrine2/pull/849 Message: 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.
admin added the Bug label 2026-01-22 14:21:10 +01:00
admin closed this issue 2026-01-22 14:21:10 +01:00
Author
Owner

@doctrinebot commented on GitHub (Nov 26, 2013):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-849] was closed:
https://github.com/doctrine/doctrine2/pull/849

@doctrinebot commented on GitHub (Nov 26, 2013): Comment created by @doctrinebot: A related Github Pull-Request [GH-849] was closed: https://github.com/doctrine/doctrine2/pull/849
Author
Owner

@doctrinebot commented on GitHub (Nov 26, 2013):

Comment created by @ocramius:

Merged: 0e3c57dbd3

@doctrinebot commented on GitHub (Nov 26, 2013): Comment created by @ocramius: Merged: https://github.com/doctrine/doctrine2/commit/0e3c57dbd35ab19e6044ee03fc20029341ac100b
Author
Owner

@doctrinebot commented on GitHub (Nov 26, 2013):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Nov 26, 2013): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#3501