Relax query binding parameter type-checking for enum types
----------------------------------------------------------

                 Key: OPENJPA-1889
                 URL: https://issues.apache.org/jira/browse/OPENJPA-1889
             Project: OpenJPA
          Issue Type: Improvement
          Components: query
            Reporter: Pinaki Poddar
            Priority: Minor


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.




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to