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.

Reply via email to