openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jody Grassel (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (OPENJPA-2261) Query SQL Cache issue with NULL parameters
Date Thu, 13 Sep 2012 15:15:07 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-2261?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jody Grassel closed OPENJPA-2261.
---------------------------------

    
> Query SQL Cache issue with NULL parameters
> ------------------------------------------
>
>                 Key: OPENJPA-2261
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2261
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: query
>    Affects Versions: 2.1.0, 2.1.1, 2.2.0
>            Reporter: Jody Grassel
>            Assignee: Jody Grassel
>             Fix For: 2.1.2, 2.3.0, 2.2.1
>
>
> The Query SQL Cache matches previously executed SQL for a given JPQL by using the JPQL
string itself for the key.  As long as none of the predicate parameters are NULL, this is
fine, as the prepared statement's SQL remains unchanged.  Since SQL requires "column IS NULL"
statements and not "column = NULL", the approach used by OpenJPA's Query SQL Cache breaks
and results with bad getResultList() returns.
> In the future (say, trunk), the Query SQL Cache needs more intelligence to handle this
situation, but for service releases the best way to handle this issue is to disqualify queries
with NULL parameters from the query cache.     

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message