DDC-3454: [GH-1224] Updated setParameters function for not replace all parameters #4260

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

Originally created by @doctrinebot on GitHub (Dec 17, 2014).

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 uthopiko:

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

Message:

When you create QueryBuilder and you bind some parameters, if you use setParameters function after bind other parameters, previous parameters are removed(https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/QueryBuilder.php#L558). This would not be a problem if it was the same behaviour with the attribute $_parameterMappings (in ParserResult), but it's not the case, given that it keeps the number of parameters introduced, throwing an exception(https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Query.php#L293). To prevent this, I've made it initialize the setParameters with the existing ones.

Originally created by @doctrinebot on GitHub (Dec 17, 2014). 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 uthopiko: Url: https://github.com/doctrine/doctrine2/pull/1224 Message: When you create QueryBuilder and you bind some parameters, if you use setParameters function after bind other parameters, previous parameters are removed(https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/QueryBuilder.php#L558). This would not be a problem if it was the same behaviour with the attribute $_parameterMappings (in ParserResult), but it's not the case, given that it keeps the number of parameters introduced, throwing an exception(https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Query.php#L293). To prevent this, I've made it initialize the setParameters with the existing ones.
admin added the Bug label 2026-01-22 14:38:25 +01:00
admin closed this issue 2026-01-22 14:38:25 +01:00
Author
Owner

@doctrinebot commented on GitHub (Dec 17, 2014):

Comment created by @doctrinebot:

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

@doctrinebot commented on GitHub (Dec 17, 2014): Comment created by @doctrinebot: A related Github Pull-Request [GH-1224] was assigned: https://github.com/doctrine/doctrine2/pull/1224
Author
Owner

@doctrinebot commented on GitHub (Jan 13, 2015):

Comment created by @doctrinebot:

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

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

@doctrinebot commented on GitHub (Jan 13, 2015):

Issue was closed with resolution "Won't Fix"

@doctrinebot commented on GitHub (Jan 13, 2015): Issue was closed with resolution "Won't Fix"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4260