DDC-3625: [GH-1339] [DDC-2224] Honor convertToDatabaseValueSQL() in DQL query parameters #4454

Closed
opened 2026-01-22 14:41:54 +01:00 by admin · 5 comments
Owner

Originally created by @doctrinebot on GitHub (Mar 18, 2015).

Originally assigned to: @Ocramius on GitHub.

Jira issue originally created by user @doctrinebot:

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

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

Message:

This is a follow-up to the abandoned #574 by @mnapoli, that fixes [DDC-2224](http://www.doctrine-project.org/jira/browse/[DDC-2224]%28http://www.doctrine-project.org/jira/browse/DDC-2224%29).

At the time, @beberlei closed the PR for the following reason, deemed unfixable:

Passing a type into the parameters is not recognized during caching, that means, using a DQL cache, the same DQL statement with (different parameter types) will lead to the same SQL being generated, depending on if the first or the second set parameter query is executed first.

This PR re-integrates the original fix, and offers a solution to the above issue: take the parameter types into account when checking the local ParserResult and the query cache.

In addition to the test for the DDC-2224 issue, I added a test to ensure that changing a parameter type invalidates the cache.

Originally created by @doctrinebot on GitHub (Mar 18, 2015). Originally assigned to: @Ocramius on GitHub. Jira issue originally created by user @doctrinebot: This issue is created automatically through a Github pull request on behalf of BenMorel: Url: https://github.com/doctrine/doctrine2/pull/1339 Message: This is a follow-up to the abandoned #574 by @mnapoli, that fixes [[DDC-2224](http://www.doctrine-project.org/jira/browse/DDC-2224)](http://www.doctrine-project.org/jira/browse/[DDC-2224]%28http://www.doctrine-project.org/jira/browse/DDC-2224%29). At the time, @beberlei closed the PR for the following reason, deemed unfixable: > Passing a type into the parameters is not recognized during caching, that means, using a DQL cache, the same DQL statement with (**different parameter types**) will lead to the same SQL being generated, depending on if the first or the second set parameter query is executed first. This PR re-integrates the original fix, and offers a solution to the above issue: take the parameter types into account when checking the local `ParserResult` and the query cache. In addition to the test for the [DDC-2224](http://www.doctrine-project.org/jira/browse/DDC-2224) issue, I added a test to ensure that changing a parameter type invalidates the cache.
admin added the Bug label 2026-01-22 14:41:54 +01:00
admin closed this issue 2026-01-22 14:41:55 +01:00
Author
Owner

@doctrinebot commented on GitHub (Mar 18, 2015):

@doctrinebot commented on GitHub (Mar 18, 2015): - is required for [DDC-2224: convertToDatabaseValueSQL() is not honored for DQL query parameters](http://www.doctrine-project.org/jira/browse/DDC-2224)
Author
Owner

@doctrinebot commented on GitHub (Mar 23, 2015):

Comment created by @doctrinebot:

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

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

@doctrinebot commented on GitHub (Mar 25, 2015):

Comment created by @doctrinebot:

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

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

@doctrinebot commented on GitHub (Mar 25, 2015):

Comment created by @doctrinebot:

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

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

@doctrinebot commented on GitHub (Mar 25, 2015):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Mar 25, 2015): 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#4454