You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Pinaki Poddar (JIRA)" <ji...@apache.org> on 2010/11/17 16:29:13 UTC

[jira] Assigned: (OPENJPA-1889) Relax query binding parameter type-checking for enum types

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

Pinaki Poddar reassigned OPENJPA-1889:
--------------------------------------

    Assignee: Pinaki Poddar

> 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.