Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 537 invoked from network); 27 Aug 2009 06:59:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 27 Aug 2009 06:59:54 -0000 Received: (qmail 82421 invoked by uid 500); 27 Aug 2009 06:59:54 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 82372 invoked by uid 500); 27 Aug 2009 06:59:54 -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 82355 invoked by uid 99); 27 Aug 2009 06:59:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Aug 2009 06:59:53 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists+1214986235816-210739@n2.nabble.com designates 216.139.236.80 as permitted sender) Received: from [216.139.236.80] (HELO jim.nabble.com) (216.139.236.80) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Aug 2009 06:59:44 +0000 Received: from jim ([127.0.0.1]) by jim.nabble.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 27 Aug 2009 01:59:23 -0500 Date: Thu, 27 Aug 2009 01:59:23 -0500 (CDT) From: Pieter Pareit To: dev@openjpa.apache.org Message-ID: <1251356363658-3521812.post@n2.nabble.com> Subject: Error in LEFT JOIN FETCH xxxx as MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: pieter.pareit@easypay.be X-OriginalArrivalTime: 27 Aug 2009 06:59:23.0674 (UTC) FILETIME=[E8AFAFA0:01CA26E3] X-Virus-Checked: Checked by ClamAV on apache.org Hi, I'm testing openJPA-2.0.0.SNAPSHOT. I have an error in my JPQL. List rows = em.createQuery("SELECT c FROM CompanyEffDate as c LEFT OUTER JOIN FETCH c.companyAddresses as ca").getResultList(); org.apache.openjpa.persistence.ArgumentException: "Encountered "as" at character 76, but expected: [",", ".", "GROUP", "HAVING", "INNER", "JOIN", "LEFT", "ORDER", "WHERE", ]." while parsing JPQL "SELECT c FROM CompanyEffDate as c LEFT OUTER JOIN FETCH c.companyAddresses as ca". See nested stack trace for original parse error. When I remove the "as ca" the query works fine. For me this this seems like an error in JPQL? Attention! There Foreignkey companyAddresses is mapped by a non-standard join. @OneToMany @ElementJoinColumn(name="companyId", referencedColumnName="id") private List companyAddresses; public List getCompanyAddresses() { return companyAddresses; } public void setCompanyAddresses(List companyAddresses) { this.companyAddresses = companyAddresses; } Regards, Pieter Pareit http://www.easypay-group.com -- View this message in context: http://n2.nabble.com/Error-in-LEFT-JOIN-FETCH-xxxx-as-tp3521812p3521812.html Sent from the OpenJPA Developers mailing list archive at Nabble.com.