Return-Path: X-Original-To: apmail-openjpa-users-archive@minotaur.apache.org Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C21B7DB58 for ; Wed, 15 May 2013 14:06:49 +0000 (UTC) Received: (qmail 84869 invoked by uid 500); 15 May 2013 14:06:49 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 84240 invoked by uid 500); 15 May 2013 14:06:43 -0000 Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openjpa.apache.org Delivered-To: mailing list users@openjpa.apache.org Received: (qmail 84011 invoked by uid 99); 15 May 2013 14:06:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 May 2013 14:06:35 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [194.109.24.29] (HELO smtp-vbr9.xs4all.nl) (194.109.24.29) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 May 2013 14:06:28 +0000 Received: from remote.huizemolenaar.nl (D57D0452.static.ziggozakelijk.nl [213.125.4.82]) (authenticated bits=0) by smtp-vbr9.xs4all.nl (8.13.8/8.13.8) with ESMTP id r4FE665C094830 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Wed, 15 May 2013 16:06:06 +0200 (CEST) (envelope-from henno@huizemolenaar.nl) Received: from HMS.hm.local ([fe80::6051:4a91:4c0d:d963]) by HMS.hm.local ([fe80::6051:4a91:4c0d:d963%10]) with mapi; Wed, 15 May 2013 16:06:11 +0200 From: Henno Vermeulen To: "'users@openjpa.apache.org'" Date: Wed, 15 May 2013 16:06:10 +0200 Subject: found a bug in criteria API left join and a solution Thread-Topic: found a bug in criteria API left join and a solution Thread-Index: Ac5RdAIdYfuaCyYESqeT2mmgOG8Q+Q== Message-ID: <1C448C478A6B4743AF19DBC3C3DCE13203EAE1DA584F@HMS.hm.local> Accept-Language: nl-NL Content-Language: nl-NL X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: nl-NL Content-Type: multipart/alternative; boundary="_000_1C448C478A6B4743AF19DBC3C3DCE13203EAE1DA584FHMShmlocal_" MIME-Version: 1.0 X-Virus-Scanned: by XS4ALL Virus Scanner X-Virus-Checked: Checked by ClamAV on apache.org --_000_1C448C478A6B4743AF19DBC3C3DCE13203EAE1DA584FHMShmlocal_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello, There is a bug in the Criteria API where a LEFT JOIN that follows another j= oin (tested for INNER JOIN) gets actual SQL that uses an INNER JOIN. This was already reported by someone else as OPENJPA-2318 and OPENJPA-2317 I investigated the issue myself and created a small OpenJPA unit test. I al= so think that I found the exact cause of the problem and the solution to it= . It's a simple matter of replacing two literal values of "false" that should= probably have been "allowNull" which is true in case of a left join. Can someone confirm that this means the bug will be fixed in an upcoming re= lease? I believe it's a simple matter of perform this change and verifying = that no existing tests are broken. See my comments in https://issues.apache.org/jira/browse/OPENJPA-2318 Thank you, Henno --_000_1C448C478A6B4743AF19DBC3C3DCE13203EAE1DA584FHMShmlocal_--