Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.0.0
-
None
-
None
Description
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);
Attachments
Issue Links
- relates to
-
OPENJPA-1903 Some queries only work the first time they are executed
- Closed