openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Logemann ...@logemann.org>
Subject Re: my report regarding MethodQL in the user list
Date Fri, 06 Mar 2009 08:45:06 GMT
Hi,

yes, that works!

Grrrr. Why do i have not seen this method in QueryImpl. But should it  
work this way for users in the long run? Looks like one need to be  
famillar with internal API stuff :) Shouldnt we trigger this somewhere  
at the getResultSet() call, or perhaps even better in the  
setParameter() call of the public Query API ?


Marc

Am 06.03.2009 um 01:21 schrieb Pinaki Poddar:

>
> Hi,
>  Add the extra lines, see if that changes anything:
>
>        OpenJPAEntityManager oem = OpenJPAPersistence.cast(em);
>        OpenJPAQuery query = oem.createQuery("openjpa.MethodQL",
> "some.full.cls.method");
>        query.setResultClass(MyResultType.class);
> +      ((org.apache.openjpa.persistence.QueryImpl)query).getDelegate()
> +         .declareParameters("String firstName, String lastName");
>        query.setParameter(1, "Fred").setParameter(2, "Lucas");
>
>
>
> Marc Logemann wrote:
>>
>> Hi,
>>
>> i created a Jira for the  issue explained in the user list:
>> https://issues.apache.org/jira/browse/OPENJPA-955
>>
>> I debugged about an hour or something and put my findings into the
>> jira issue. Quite complex stuff with all the delegates, so i wasnt
>> able to fix it.... perhaps someone else is good in that code "area".
>>
>> Marc
>>
>
> -- 
> View this message in context: http://n2.nabble.com/my-report-regarding-MethodQL-in-the-user-list-tp2430597p2433186.html
> Sent from the OpenJPA Developers mailing list archive at Nabble.com.
>


Mime
View raw message