Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 53261 invoked from network); 27 Jun 2007 11:52:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Jun 2007 11:52:48 -0000 Received: (qmail 1511 invoked by uid 500); 27 Jun 2007 11:52:51 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 1445 invoked by uid 500); 27 Jun 2007 11:52:51 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 1432 invoked by uid 99); 27 Jun 2007 11:52:51 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jun 2007 04:52:50 -0700 X-ASF-Spam-Status: No, hits=-99.7 required=10.0 tests=ALL_TRUSTED,MAILTO_TO_SPAM_ADDR X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jun 2007 04:52:47 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C1E5F71403E for ; Wed, 27 Jun 2007 04:52:26 -0700 (PDT) Message-ID: <24462440.1182945146720.JavaMail.jira@brutus> Date: Wed, 27 Jun 2007 04:52:26 -0700 (PDT) From: "Patrick Linskey (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Created: (OPENJPA-267) MethodQL unnecessarily requires a call to declareParameters() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org MethodQL unnecessarily requires a call to declareParameters() ------------------------------------------------------------- Key: OPENJPA-267 URL: https://issues.apache.org/jira/browse/OPENJPA-267 Project: OpenJPA Issue Type: Bug Components: query Affects Versions: 0.9.7, 0.9.6, 0.9.0 Reporter: Patrick Linskey Fix For: 1.0.0 OpenJPA should be able to infer the parameters from the signature when there is no method overloading, and in the case where there is method overloading, it'd be nice if OpenJPA would allow the args specification to happen inline in the method declaration. More context: On 6/26/07, e33238 wrote: > > I'm tracing through the code to find out what the problem was, and it seems > that it'll work if I do this: > > OpenJPAQuery q = > oem.createQuery("openjpa.MethodQL","com.xyz.Finder.getByName"); > q.setResultClass(Person.class); > q.setParameter("firstName", "Fred").setParameter("lastName", "Lucas"); > ((QueryImpl)q).getDelegate().declareParameters("String firstName, String > lastName"); //<== additional line > List results = q.getResultList(); > > Now getByName() will be called correctly, with "firstName" and "lastName" in > the "params" map. I'm sure this is not the correct way, but I couldn't > figure out how else I can call declareParameters(). Without calling > declareParameters(), I'll get the ArgumentException. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.