Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-1750

Prepared query with enum parameter fails when query is cached

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.0.0
    • None
    • query
    • 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

          Activity

            People

              Unassigned Unassigned
              heikki Heikki Turakainen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: