Return-Path: X-Original-To: apmail-cayenne-commits-archive@www.apache.org Delivered-To: apmail-cayenne-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 788087684 for ; Tue, 1 Nov 2011 15:25:54 +0000 (UTC) Received: (qmail 33013 invoked by uid 500); 1 Nov 2011 15:25:54 -0000 Delivered-To: apmail-cayenne-commits-archive@cayenne.apache.org Received: (qmail 32721 invoked by uid 500); 1 Nov 2011 15:25:53 -0000 Mailing-List: contact commits-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cayenne.apache.org Delivered-To: mailing list commits@cayenne.apache.org Received: (qmail 32530 invoked by uid 99); 1 Nov 2011 15:25:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2011 15:25:53 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2011 15:25:52 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 8BA8232CB2D for ; Tue, 1 Nov 2011 15:25:32 +0000 (UTC) Date: Tue, 1 Nov 2011 15:25:32 +0000 (UTC) From: "Andrus Adamchik (Created) (JIRA)" To: commits@cayenne.apache.org Message-ID: <173001477.46014.1320161132573.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Created] (CAY-1635) EJBQL: Fetch join and another join over the same relationship result in a conflicting alias MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 EJBQL: Fetch join and another join over the same relationship result in a conflicting alias ------------------------------------------------------------------------------------------- Key: CAY-1635 URL: https://issues.apache.org/jira/browse/CAY-1635 Project: Cayenne Issue Type: Bug Affects Versions: 3.1M3 Reporter: Andrus Adamchik Assignee: Andrus Adamchik (this explodes, as Cayenne generates "t1" alias for both FETCH JOIN and implicit INNER JOIN over the same relationship buffer.append("SELECT g, count(g.linkedItems) FROM Gallery g"); buffer.append(" LEFT JOIN FETCH g.r1"); buffer.append(" WHERE g.r3 = ?1"); buffer.append(" AND g.r1.r2.location <> 'xyz'"); buffer.append(" GROUP BY g"); (this is a workaround - name your joins... still can't get used to this EJBQL style join handling) buffer.append("SELECT g, count(g.linkedItems) FROM Gallery g"); buffer.append(" LEFT JOIN FETCH g.r1"); buffer.append(" JOIN g.r1 s"); buffer.append(" WHERE g.r3 = ?1"); buffer.append(" AND s.r2.location <> 'xyz'"); buffer.append(" GROUP BY g"); -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira