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

        Catalina Wei created issue -
        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.
        Catalina Wei made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.0.0 [ 12314019 ]
        Resolution Fixed [ 1 ]
        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
        Catalina Wei made changes -
        Summary JPQL named parameter using a reserved word (:vlaue) resulting in ArgumentException JPQL named parameter using a reserved word resulting in ArgumentException
        Affects Version/s 1.3.0 [ 12313326 ]
        Affects Version/s 2.0.0 [ 12314019 ]
        Donald Woods made changes -
        Fix Version/s 2.0.0-beta [ 12314149 ]
        Fix Version/s 2.0.0 [ 12314019 ]
        Donald Woods made changes -
        Fix Version/s 1.3.0 [ 12313326 ]
        Donald Woods made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development