From dev-return-19629-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Wed Oct 26 00:46:52 2011 Return-Path: X-Original-To: apmail-openjpa-dev-archive@www.apache.org Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8967F941F for ; Wed, 26 Oct 2011 00:46:52 +0000 (UTC) Received: (qmail 6157 invoked by uid 500); 26 Oct 2011 00:46:52 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 6128 invoked by uid 500); 26 Oct 2011 00:46:52 -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 6120 invoked by uid 99); 26 Oct 2011 00:46:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Oct 2011 00:46:52 +0000 X-ASF-Spam-Status: No, hits=-2000.5 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; Wed, 26 Oct 2011 00:46:51 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 1B93B31C479 for ; Wed, 26 Oct 2011 00:44:32 +0000 (UTC) Date: Wed, 26 Oct 2011 00:44:32 +0000 (UTC) From: "Ravi P Palacherla (Updated) (JIRA)" To: dev@openjpa.apache.org Message-ID: <109293524.15995.1319589872114.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1183299376.15993.1319589632072.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (OPENJPA-2066) Edge case in openJPA-1227. openJPA fails to create a join and thus returns wrong data when a collection is selected from superclass and another field is selected from subclass twoor more levels down the hierarchy. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/OPENJPA-2066?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ravi P Palacherla updated OPENJPA-2066: --------------------------------------- Attachment: OPENJPA2066_11x.diff Patch contributed by Hiroki Tateno. Test case contributed by Ravi Palacherla. > Edge case in openJPA-1227. openJPA fails to create a join and thus returns wrong data when a collection is selected from superclass and another field is selected from subclass twoor more levels down the hierarchy. > --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: OPENJPA-2066 > URL: https://issues.apache.org/jira/browse/OPENJPA-2066 > Project: OpenJPA > Issue Type: Bug > Affects Versions: 1.1.1, 2.1.1 > Reporter: Ravi P Palacherla > Priority: Minor > Fix For: 1.1.1, 2.1.1 > > Attachments: OPENJPA2066_11x.diff > > > openJPA-1227 fixes the wrong SQL generation error when superclass contains an eager to-many field, and this is the only field selected in the superclass, and when one or more fields are selected in the subclass, openjpa fails to create a join between the subclass and superclass. But the issue still remains when one or more fields are selected from subclasses two levels down the hierarchy. > Example: > GrandChildClass extends ChildChildClass extends ChildClass extends ParentClass. > When I select a filed from GrandChildClass and a to-many field from ParentClass then openjpa fails to create a join between the classes. -- 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