From dev-return-8986-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Tue Aug 19 11:41:11 2008 Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 72688 invoked from network); 19 Aug 2008 11:41:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Aug 2008 11:41:11 -0000 Received: (qmail 26611 invoked by uid 500); 19 Aug 2008 11:41:09 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 26579 invoked by uid 500); 19 Aug 2008 11:41:09 -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 26568 invoked by uid 99); 19 Aug 2008 11:41:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Aug 2008 04:41:09 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [147.91.1.120] (HELO afrodita.rcub.bg.ac.yu) (147.91.1.120) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Aug 2008 11:40:12 +0000 Received: from [147.91.4.66] (ognjen-pc.rcub.bg.ac.yu [147.91.4.66]) by afrodita.rcub.bg.ac.yu (Postfix) with ESMTP id 5DA941919855 for ; Tue, 19 Aug 2008 13:40:30 +0200 (CEST) Message-ID: <48AAB020.5070303@etf.bg.ac.yu> Date: Tue, 19 Aug 2008 13:36:00 +0200 From: Ognjen Blagojevic User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: OpenJPA developer list Subject: Selecting multiple objects - bug? Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-RCUB-MailScanner-Information: Please contact the ISP for more information X-RCUB-MailScanner: Found to be clean X-Virus-Checked: Checked by ClamAV on apache.org Hi, When I try to select multiple objects in a query like this one (publisher of the magazine can be null - unknown): SELECT m, p FROM Magazine m LEFT OUTER JOIN m.idPublisher p WHERE ((:useName = false) OR (p.name like :name)) I would expect to get the resultset of pairs (Magazine, Publisher), but what OpenJPA 1.1.0 returns is resultset of pairs (Publisher, Publisher). Did anyone else noticed this behavior, and should I file a bug report? Is it allowed in JPA spec to select multiple objects? Regards, Ognjen ps. I know I could select just Magazine, and then get Publisher from there. The actual query is more complex, this one is just for the purpose of showing the bug.