From dev-return-13480-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Tue Sep 01 16:53:57 2009 Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 43435 invoked from network); 1 Sep 2009 16:53:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Sep 2009 16:53:57 -0000 Received: (qmail 62233 invoked by uid 500); 1 Sep 2009 16:53:57 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 62173 invoked by uid 500); 1 Sep 2009 16:53:56 -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 62163 invoked by uid 99); 1 Sep 2009 16:53:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Sep 2009 16:53:56 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Sep 2009 16:53:54 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C7E2E234C004 for ; Tue, 1 Sep 2009 09:53:32 -0700 (PDT) Message-ID: <773595793.1251824012799.JavaMail.jira@brutus> Date: Tue, 1 Sep 2009 09:53:32 -0700 (PDT) From: "David Minor (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Updated: (OPENJPA-1201) "Mapped by" field not set when contained in superclass In-Reply-To: <1236141406.1248805095062.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-1201?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] David Minor updated OPENJPA-1201: --------------------------------- Attachment: test-abstract-class-inverse-relation.patch Test case patch against 1.2.1 which demonstrates the issue. > "Mapped by" field not set when contained in superclass > ------------------------------------------------------- > > Key: OPENJPA-1201 > URL: https://issues.apache.org/jira/browse/OPENJPA-1201 > Project: OpenJPA > Issue Type: Bug > Components: jdbc > Affects Versions: 1.2.0, 1.2.1 > Reporter: David Minor > Attachments: openjpa_superclass_collection.patch, test-abstract-class-inverse-relation.patch > > > The mapped by field (inverse relation) is not set when the field is contained in a superclass. In my case the problem was with a collection of objects of the same type (i.e. a hierarchy), and using parallel eager fetch mode, but I think the problem may be more general. > I tracked the problem to the setMappedBy() method in JDBCStoreManager, which is calling getDeclaredFieldMappings(), but the result of this call doesn't include superclass field mappings. Changing it to getFieldMappings() fixed the problem. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.