openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Heikki Turakainen (JIRA)" <j...@apache.org>
Subject [jira] Created: (OPENJPA-1750) Prepared query with enum parameter fails when query is cached
Date Thu, 29 Jul 2010 09:03:17 GMT
Prepared query with enum parameter fails when query is cached
-------------------------------------------------------------

                 Key: OPENJPA-1750
                 URL: https://issues.apache.org/jira/browse/OPENJPA-1750
             Project: OpenJPA
          Issue Type: Bug
          Components: query
    Affects Versions: 2.0.0
            Reporter: Heikki Turakainen


A prepared query with an enum parameter fails when exactly the same query is executed again.
In other words, it works once, when the query is not cached yet.

The exception: org.springframework.dao.InvalidDataAccessApiUsageException: The specified parameter
of type " ... " is not a valid query parameter.

An example query string is: 
select distinct a from MyClass a where a.state in (:STATE)
where the STATE is a list of enums.

There is a temporary workaround to bypass the cache with
query.setHint(QueryHints.HINT_IGNORE_PREPARED_QUERY, queryString);


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message