openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Logemann (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-955) MethodQL parameter passing broken
Date Fri, 06 Mar 2009 14:57:58 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-955?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12679608#action_12679608
] 

Marc Logemann commented on OPENJPA-955:
---------------------------------------

Nice to have it also in 1.3.x

Perhaps we should create a JIRA which makes the "declareParameters" obsolete. As discussed
in the dev-list, we could determine the parameter types on the setParameter() calls on the
public Query class. This would prevent users from calling (internal) delegates.

> MethodQL parameter passing broken
> ---------------------------------
>
>                 Key: OPENJPA-955
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-955
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.2.0
>            Reporter: Marc Logemann
>            Assignee: Michael Dick
>             Fix For: 1.3.0, 2.0.0
>
>
>         OpenJPAEntityManager oem = OpenJPAPersistence.cast(em);
>         OpenJPAQuery query = oem.createQuery("openjpa.MethodQL", "de.logentis.openjpa.LogentisMethodQL.blabla");
>         query.setResultClass(DP_PLZ_DA.class);
>         query.setParameter(1, "Fred").setParameter(2, "Lucas");
> This results of an empty parameter Map in the LogentisMethodQL.blabla() method. 
> Even worse, when doing parameter passing as stated in the docs Chapter 9 / 5:
> query.setParameter("first", "Fred").setParameter("last", "Lucas");
> There is an exception thrown.
> In fact MethodQL is completely broken when it comes to parameters at this point.

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