From dev-return-14079-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Fri Oct 23 17:54:24 2009 Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 33549 invoked from network); 23 Oct 2009 17:54:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Oct 2009 17:54:24 -0000 Received: (qmail 3531 invoked by uid 500); 23 Oct 2009 17:54:23 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 3441 invoked by uid 500); 23 Oct 2009 17:54:23 -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 3428 invoked by uid 99); 23 Oct 2009 17:54:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Oct 2009 17:54:23 +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; Fri, 23 Oct 2009 17:54:20 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 63C37234C045 for ; Fri, 23 Oct 2009 10:53:59 -0700 (PDT) Message-ID: <369187535.1256320439393.JavaMail.jira@brutus> Date: Fri, 23 Oct 2009 17:53:59 +0000 (UTC) From: "Matthew T. Adams (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Created: (OPENJPA-1361) Enhancer fails when using OneToMany.mappedBy on bidi one-to-many relationship when using interface references on many side 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 Enhancer fails when using OneToMany.mappedBy on bidi one-to-many relationship when using interface references on many side -------------------------------------------------------------------------------------------------------------------------- Key: OPENJPA-1361 URL: https://issues.apache.org/jira/browse/OPENJPA-1361 Project: OpenJPA Issue Type: Bug Affects Versions: 1.2.1 Reporter: Matthew T. Adams Synopsis: bidirectional one-to-many relationship where the one side references the objects on the many side using a concrete class reference and the many side references the object on the one side using an interface reference. When specifying the mappedBy property of the @OneToMany annotation, the OpenJPA enhancer throws the error: Collection field "example.model.Concrete.pebbles" declares that it is mapped by "example.model.Pebble.buildingMaterial", but this is not a valid inverse relation. When I remove the mappedBy property, everything works fine, except that OpenJPA creates an extra join table (Concrete_Pebble) where it shouldn't, IMHO. I have two questions, an answer to either one of which will suffice: 1. Why can't I use mappedBy in this scenario? 2. How do I annotate things with @JoinColumn or similar that will allow me to not have a join table and only the reference from Pebble back to its BuildingMaterial? I'll attach test case next. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.