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] Resolved: (OPENJPA-1889) Relax query binding parameter type-checking for enum types
Date Wed, 17 Nov 2010 15:29:14 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-1889?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Pinaki Poddar resolved OPENJPA-1889.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.0

> 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
>            Assignee: Pinaki Poddar
>            Priority: Minor
>             Fix For: 2.1.0
>
>
> 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