OpenJPA
  1. OpenJPA
  2. OPENJPA-1889

Relax query binding parameter type-checking for enum types

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.0
    • Component/s: query
    • Labels:
      None

      Description

      Current user-supplied query parameter values are checked strongly against the type they bind to.
      For example, a query
      Query q = "select p from Person p where p.gender=:g";
      q.setParameter("g", "MALE");
      will fail if Person.gender is of enum Gender

      {MALE,FEMALE}

      The correct usage is q.setParameter("g", Gender.MALE);

      We are relaxing this from the standpoint of a language-neutral client that does not have access to Gender enum type.

        Issue Links

          Activity

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          17h 29m 1 Pinaki Poddar 17/Nov/10 15:29
          Peter Martinovic made changes -
          Link This issue is blocked by OPENJPA-2183 [ OPENJPA-2183 ]
          Pinaki Poddar made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 2.1.0 [ 12314542 ]
          Resolution Fixed [ 1 ]
          Pinaki Poddar made changes -
          Field Original Value New Value
          Assignee Pinaki Poddar [ ppoddar@apache.org ]
          Pinaki Poddar created issue -

            People

            • Assignee:
              Pinaki Poddar
              Reporter:
              Pinaki Poddar
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development