From jdo-dev-return-7593-apmail-db-jdo-dev-archive=www.apache.org@db.apache.org Mon Sep 08 20:28:05 2008 Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 88694 invoked from network); 8 Sep 2008 20:28:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Sep 2008 20:28:05 -0000 Received: (qmail 29290 invoked by uid 500); 8 Sep 2008 20:28:03 -0000 Mailing-List: contact jdo-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jdo-dev@db.apache.org Delivered-To: mailing list jdo-dev@db.apache.org Received: (qmail 29279 invoked by uid 99); 8 Sep 2008 20:28:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Sep 2008 13:28:02 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Sep 2008 20:27:13 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7D253234C1D6 for ; Mon, 8 Sep 2008 13:27:44 -0700 (PDT) Message-ID: <2030690302.1220905664511.JavaMail.jira@brutus> Date: Mon, 8 Sep 2008 13:27:44 -0700 (PDT) From: "Craig Russell (JIRA)" To: jdo-dev@db.apache.org Subject: [jira] Updated: (JDO-573) JPOX creates bad SQL for navigational queries In-Reply-To: <23756707.1201906508701.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JDO-573?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:all-tabpanel ] Craig Russell updated JDO-573: ------------------------------ Affects Version/s: JDO 2 maintenance release 2 Fix Version/s: (was: JDO 2 maintenance release 2) JDO 2 maintenance release 3 Kick the bug down the road to JDO 2.3. The original failing test class, tck2/src/java/org/apache/jdo/tck/query/res= ult/VariableInResultNavigation.java, has been updated to remove the failing= test case, and a new test class, tck2/src/java/org/apache/jdo/tck/query/re= sult/VariableInResultMultipleNavigation.java, has been added. The new test = class is not listed in any configuration file. > JPOX creates bad SQL for navigational queries > --------------------------------------------- > > Key: JDO-573 > URL: https://issues.apache.org/jira/browse/JDO-573 > Project: JDO > Issue Type: Bug > Components: tck2, tck2-legacy > Affects Versions: JDO 2 maintenance release 1, JDO 2 maintenance relea= se 2 > Reporter: Craig Russell > Assignee: Andy Jefferson > Fix For: JDO 2 maintenance release 3 > > > The test org.apache.jdo.tck.query.result.VariableInResultNavigation fails= with incorrect SQL generated. > [java] 1) testNavigationWithThisAndCompany(org.apache.jdo.tck.query.r= esult.VariableInResultNavigation)javax.jdo.JDOException: JDOException throw= n while executing query: > [java] SELECT this, e, p FROM org.apache.jdo.tck.pc.company.Company W= HERE name =3D=3D "Sun Microsystems, Inc." && departments.contains(d) && d.e= mployees.contains(e) && e.projects.contains(p) VARIABLES Department d; Empl= oyee e; Project p=20 > [java] =09at org.apache.jdo.tck.query.QueryTest.execute(QueryTest.jav= a:1314) > [java] =09at org.apache.jdo.tck.query.QueryTest.execute(QueryTest.jav= a:1135) > [java] =09at org.apache.jdo.tck.query.QueryTest.executeAPIQuery(Query= Test.java:1071) > [java] =09at org.apache.jdo.tck.query.QueryTest.executeAPIQuery(Query= Test.java:1051) > [java] =09at org.apache.jdo.tck.query.result.VariableInResultNavigati= on.testNavigationWithThisAndCompany(VariableInResultNavigation.java:251) > [java] =09at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Meth= od) > [java] =09at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethod= AccessorImpl.java:39) > [java] =09at sun.reflect.DelegatingMethodAccessorImpl.invoke(Delegati= ngMethodAccessorImpl.java:25) > [java] =09at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:254) > [java] =09at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestR= unner.java:108) > [java] =09at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestR= unner.java:148) > [java] =09at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRu= nner.java:123) > [java] NestedThrowablesStackTrace: > [java] javax.jdo.JDODataStoreException: [JPOX-042007] Error executing= JDOQL query "SELECT THIS.DATASTORE_IDENTITY,UNBOUND_E.DATASTORE_IDENTITY,U= NBOUND_P.DATASTORE_IDENTITY FROM datastoreidentity0.COMPANIES THIS , datast= oreidentity0.PERSONS UNBOUND_E , datastoreidentity0.PROJECTS UNBOUND_P WHER= E EXISTS (SELECT 1 FROM datastoreidentity0.DEPARTMENTS THIS_DEPARTMENTS_D W= HERE EXISTS (SELECT 1 FROM datastoreidentity0.PERSONS THIS_DEPARTMENTS_D_EM= PLOYEES_E WHERE THIS_DEPARTMENTS_D_EMPLOYEES_E.DEPARTMENT =3D THIS_DEPARTME= NTS_D.DATASTORE_IDENTITY AND THIS_DEPARTMENTS_D.COMPANYID =3D THIS.DATASTOR= E_IDENTITY AND THIS."NAME" =3D ?)) AND EXISTS (SELECT 1 FROM datastoreident= ity0.PROJECT_MEMBER THIS_DEPARTMENTS_D_EMPLOYEES_E_PROJECTS_P WHERE THIS_DE= PARTMENTS_D_EMPLOYEES_E_PROJECTS_P."MEMBER" =3D THIS_DEPARTMENTS_D_EMPLOYEE= S_E.DATASTORE_IDENTITY AND UNBOUND_P.DATASTORE_IDENTITY =3D THIS_DEPARTMENT= S_D_EMPLOYEES_E_PROJECTS_P.PROJID)" : Column 'THIS_DEPARTMENTS_D_EMPLOYEES_= E.DATASTORE_IDENTITY' is either not in any table in the FROM list or appear= s within a join specification and is outside the scope of the join specific= ation or appears in a HAVING clause and is not in the GROUP BY list. If thi= s is a CREATE or ALTER TABLE statement then 'THIS_DEPARTMENTS_D_EMPLOYEES_= E.DATASTORE_IDENTITY' is not a column in the target table.. --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.