OpenJPA
  1. OpenJPA
  2. OPENJPA-1388

JPQL named parameter using a reserved word resulting in ArgumentException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.0
    • Fix Version/s: 1.3.0, 2.0.0-beta
    • Component/s: query
    • Labels:
      None

      Description

      In JPA2, additional reserved words are introduced in the JPQL language. For example, KEY, VALUE, ENTRY, CASE, etc.
      These keywords is causing existing application that migrate to JPA2 regressed in ArgumentException (JPQL parser error).
      For example,

      JPQL: select c from Customer c where c.name = :value

      :value is a named parameter, but 'value' is a reserved word in JPA2.

      The above query used to work in OpenJPA-1.2.x but not in OpenJPA-2.x

        Activity

        Hide
        Catalina Wei added a comment -

        Same fix applied to 1.3 branch

        Show
        Catalina Wei added a comment - Same fix applied to 1.3 branch
        Hide
        Catalina Wei added a comment -

        Using reserved words as named parameter is allowed in JPQL query.

        Show
        Catalina Wei added a comment - Using reserved words as named parameter is allowed in JPQL query.

          People

          • Assignee:
            Catalina Wei
            Reporter:
            Catalina Wei
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development