openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pinaki Poddar (JIRA)" <j...@apache.org>
Subject [jira] Created: (OPENJPA-1889) Relax query binding parameter type-checking for enum types
Date Tue, 16 Nov 2010 22:01:13 GMT
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.


Mime
View raw message