Return-Path: Delivered-To: apmail-incubator-open-jpa-dev-archive@locus.apache.org Received: (qmail 62139 invoked from network); 23 Aug 2006 03:18:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Aug 2006 03:18:12 -0000 Received: (qmail 79605 invoked by uid 500); 23 Aug 2006 03:18:12 -0000 Delivered-To: apmail-incubator-open-jpa-dev-archive@incubator.apache.org Received: (qmail 79536 invoked by uid 500); 23 Aug 2006 03:18:12 -0000 Mailing-List: contact open-jpa-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: open-jpa-dev@incubator.apache.org Delivered-To: mailing list open-jpa-dev@incubator.apache.org Received: (qmail 79526 invoked by uid 99); 23 Aug 2006 03:18:12 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Aug 2006 20:18:12 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of mprudhomapache@gmail.com designates 64.233.162.192 as permitted sender) Received: from [64.233.162.192] (HELO nz-out-0102.google.com) (64.233.162.192) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Aug 2006 20:18:07 -0700 Received: by nz-out-0102.google.com with SMTP id n29so1101874nzf for ; Tue, 22 Aug 2006 20:17:47 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:mime-version:in-reply-to:references:content-type:message-id:content-transfer-encoding:from:subject:date:to:x-mailer:sender; b=JD4FoIw2TXyiAW63u9ZoCs4yplvhh70myA+4HNN2GgVgMYtb82wffb1+6yGHtIihYv/wsC5ZoraGQIXSfh/qYffoTrbzqMiShf1AfMb7ncMpRPH4Ivl74iMvV+zf2zBMN3T8LA+EJhNdmG0Kif2VIbndVlyYz4GGW37iPaPxRvc= Received: by 10.65.126.4 with SMTP id d4mr7985193qbn; Tue, 22 Aug 2006 20:17:46 -0700 (PDT) Received: from ?10.32.7.135? ( [66.248.222.242]) by mx.gmail.com with ESMTP id p4sm1144532qba.2006.08.22.20.17.45; Tue, 22 Aug 2006 20:17:46 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v752.2) In-Reply-To: <89c0c52c0608221439o7055c30fn10b1cf5f8a2d1a7c@mail.gmail.com> References: <89c0c52c0608221421uc019041ge7dfc521ba5a6b67@mail.gmail.com> <7D856CDFE035FF45A0420ACBD71BDD6301C75508@repbex02.amer.bea.com> <89c0c52c0608221439o7055c30fn10b1cf5f8a2d1a7c@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <189A5649-D2DC-44AE-9FA0-A5C4916ACD49@apache.org> Content-Transfer-Encoding: 7bit From: Marc Prud'hommeaux Subject: Re: [jira] Updated: (OPENJPA-15) EJBQL grammar needs to be updated to relfect JPA specification Date: Tue, 22 Aug 2006 20:17:32 -0700 To: open-jpa-dev@incubator.apache.org X-Mailer: Apple Mail (2.752.2) Sender: Marc Prud'hommeaux X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Kevin- I applied your patch, but there were a couple problems with our local tests. This statement caused a parse error: "update kodo.kernel.AttachD x set x.dint = 1 where x.dint <> (select min(y.dint) from kodo.kernel.AttachD y)" 1) testBulkUpdate(kodo.query.TestJPQLExpressions)<4|false|0.9.0> org.apache.openjpa.util.UserException: An error occurred while parsing the query filter "update kodo.kernel.AttachD x set x.dint = 1 where x.dint <> (select min(y.dint) from kodo.kernel.AttachD y)". Error message: The alias "PATH" was not declared in the statement (declared aliases are: {1}). All aliases must be declared in the "from" section of the JPQL statement. at org.apache.openjpa.kernel.exps.AbstractExpressionBuilder.parseException( AbstractExpressionBuilder.java:113) at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaDat a(JPQLExpressionBuilder.java:236) at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getSubquery (JPQLExpressionBuilder.java:1127) at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.eval (JPQLExpressionBuilder.java:1051) at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getValue (JPQLExpressionBuilder.java:1364) at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getValue (JPQLExpressionBuilder.java:1350) at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.eval (JPQLExpressionBuilder.java:766) at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getExpression (JPQLExpressionBuilder.java:1341) at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.eval (JPQLExpressionBuilder.java:709) at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.evalWhereClause (JPQLExpressionBuilder.java:492) at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getQueryExpressions (JPQLExpressionBuilder.java:257) at org.apache.openjpa.kernel.jpql.JPQLParser.eval (JPQLParser.java:58) And this statement actually parsed, but it returned the wrong number of results for some reason (I'm guessing maybe because the subselect correlation was lost): "select d from kodo.kernel.AttachD d where exists (select a.aint from d.a a where a.aint = 1)" Do you think you can fix these problems and re-submit the patch? On Aug 22, 2006, at 2:39 PM, Kevin Sutter wrote: > Sounds like a good plan. New or updated tests would be good to > demonstrate > that a fix works. Even if we would provide a working testcase with > the fix, > that would be a good way to populate our test bucket. > > Concerning all of the query related JIRA reports that have been > opened, do > we have a base set of testcases for query within OpenJPA? That is, > do we > have a query test framework that we should attempt to work within? > > Thanks, > Kevin > > On 8/22/06, Patrick Linskey wrote: >> >> (Note that my response here doesn't really answer your question.) >> >> I think that it's good that we've been using JIRA to store >> information >> about changes we're making, but I think it's far more important >> that we >> create test cases that demonstrate the old bad behavior and assert >> the >> new good behavior. That is, I'd like to see us create tests that fail >> against the old version of OpenJPA but pass once the patch is >> applied. >> >> One difficulty with this, of course, is that currently things are >> set up >> so that all tests must pass during a normal compilation. Does anyone >> know of a way to designate to mvn that certain tests are expected to >> fail, so that we can commit tests that break along with JIRA reports? >> >> -Patrick >> >> -- >> Patrick Linskey >> BEA Systems, Inc. >> >> > -----Original Message----- >> > From: Kevin Sutter [mailto:kwsutter@gmail.com] >> > Sent: Tuesday, August 22, 2006 2:21 PM >> > To: open-jpa-dev@incubator.apache.org >> > Subject: Re: [jira] Updated: (OPENJPA-15) EJBQL grammar needs >> > to be updated to relfect JPA specification >> > >> > Now that we have successfully created a patch for OPENJPA-15, >> > what is the >> > process for getting this validated and hopefully accepted >> > into SVN? I have >> > been able to verify that the patch can be applied, everything >> > builds, and >> > the existing testcases still work. But, I'm not an expert >> > with the code >> > that is being updated, so it would be good for another >> > committer to verify >> > the changes. >> > >> > Thanks! >> > Kevin >> > >> > On 8/22/06, Catalina Wei (JIRA) wrote: >> > > >> > > [ http://issues.apache.org/jira/browse/OPENJPA-15?page=all ] >> > > >> > > Catalina Wei updated OPENJPA-15: >> > > -------------------------------- >> > > >> > > Attachment: OPENJPA-15.openjpa-kernel.txt >> > > >> > > This patch is applied successfully against openjpa-kenel. >> > > please ignore the previous attachments. >> > > >> > > > EJBQL grammar needs to be updated to relfect JPA specification >> > > > -------------------------------------------------------------- >> > > > >> > > > Key: OPENJPA-15 >> > > > URL: >> > http://issues.apache.org/jira/browse/OPENJPA-15 >> > > > Project: OpenJPA >> > > > Issue Type: Bug >> > > > Components: query >> > > > Reporter: David Wisneski >> > > > Assigned To: Catalina Wei >> > > > Attachments: OPENJPA-15.openjpa-kernel.txt, >> OPENJPA-15.txt >> > > > >> > > > >> > > > when used in subquery, SELECT has different grammar than >> > in top most >> > > query. SELECT NEW is not allowed. FROM in subuqery has >> > different syntax >> > > than in top most query. For example "FROM d.employees as e >> " in >> > > subquery where it would be invalid in top query. >> > Expression syntax in >> > > HAVING clause needs to allow "HAVING min(e.salary) > 10 " is >> > > valid provided that e.salary is a grouping field. >> > > >> > > -- >> > > This message is automatically generated by JIRA. >> > > - >> > > If you think it was sent incorrectly contact one of the >> > administrators: >> > > http://issues.apache.org/jira/secure/Administrators.jspa >> > > - >> > > For more information on JIRA, see: >> > http://www.atlassian.com/software/jira >> > > >> > > >> > > >> > >> _____________________________________________________________________ >> __ >> Notice: This email message, together with any attachments, may >> contain >> information of BEA Systems, Inc., its subsidiaries and >> affiliated >> entities, that may be confidential, proprietary, copyrighted >> and/or >> legally privileged, and is intended solely for the use of the >> individual >> or entity named in this message. If you are not the intended >> recipient, >> and have received this message in error, please immediately return >> this >> by email and then delete it. >>