You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Pinaki Poddar (JIRA)" <ji...@apache.org> on 2010/03/15 21:07:27 UTC
[jira] Created: (OPENJPA-1575) Query parameter on externalized
field breaks Prepared Query Cache
Query parameter on externalized field breaks Prepared Query Cache
-----------------------------------------------------------------
Key: OPENJPA-1575
URL: https://issues.apache.org/jira/browse/OPENJPA-1575
Project: OpenJPA
Issue Type: Bug
Components: kernel, query
Affects Versions: 2.0.0-beta2
Reporter: Pinaki Poddar
Assignee: Pinaki Poddar
Fix For: 2.0.0
If field value has been externalized and the query is using a parameter for that field, caching its SQL breaks because re-parametrization of the SQL can not externalize the user supplied parameter value through the field. The worse is the query is cached anyway and its parameter substituted with (wrong) non-externalized, user-supplied value -- resulting in wrong result.
Currently we will detect such usage and exclude the the query being cached.
However, we can consider a mechanics to capture the parametrized fields in a query expression tree and appropriately pass the user values through the fields' externalizer in future.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (OPENJPA-1575) Query parameter on externalized
field breaks Prepared Query Cache
Posted by "Pinaki Poddar (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pinaki Poddar resolved OPENJPA-1575.
------------------------------------
Resolution: Fixed
> Query parameter on externalized field breaks Prepared Query Cache
> -----------------------------------------------------------------
>
> Key: OPENJPA-1575
> URL: https://issues.apache.org/jira/browse/OPENJPA-1575
> Project: OpenJPA
> Issue Type: Bug
> Components: kernel, query
> Affects Versions: 2.0.0-beta2
> Reporter: Pinaki Poddar
> Assignee: Pinaki Poddar
> Fix For: 2.0.0
>
>
> If field value has been externalized and the query is using a parameter for that field, caching its SQL breaks because re-parametrization of the SQL can not externalize the user supplied parameter value through the field. The worse is the query is cached anyway and its parameter substituted with (wrong) non-externalized, user-supplied value -- resulting in wrong result.
> Currently we will detect such usage and exclude the the query being cached.
> However, we can consider a mechanics to capture the parametrized fields in a query expression tree and appropriately pass the user values through the fields' externalizer in future.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.