Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 26050 invoked from network); 7 May 2009 16:49:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 May 2009 16:49:56 -0000 Received: (qmail 9635 invoked by uid 500); 7 May 2009 16:49:56 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 9557 invoked by uid 500); 7 May 2009 16:49: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 9541 invoked by uid 99); 7 May 2009 16:49:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 May 2009 16:49: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; Thu, 07 May 2009 16:49:52 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 07AB0234C04C for ; Thu, 7 May 2009 09:49:32 -0700 (PDT) Message-ID: <497027317.1241714972030.JavaMail.jira@brutus> Date: Thu, 7 May 2009 09:49:32 -0700 (PDT) From: "Rick Curtis (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Updated: (OPENJPA-1072) Nested embeddable with a relationship to an Entity with a generated id doesn't persist the relationship In-Reply-To: <1873429129.1241714971909.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-1072?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rick Curtis updated OPENJPA-1072: --------------------------------- Attachment: jpa.embeddables.zip Attaching recreate. > Nested embeddable with a relationship to an Entity with a generated id doesn't persist the relationship > ------------------------------------------------------------------------------------------------------- > > Key: OPENJPA-1072 > URL: https://issues.apache.org/jira/browse/OPENJPA-1072 > Project: OpenJPA > Issue Type: Bug > Components: jpa > Affects Versions: 2.0.0 > Reporter: Rick Curtis > Attachments: jpa.embeddables.zip > > > When working with embeddables I found that if I define a unidirectional @ManyToOne relationship from an embeddable to an Entity which has a generated id, the relationship in the join table doesn't get persisted. I'll attach a zip with my code, but I'll also try to describe the scenario here. > Entities: > Seller - Has an auto generated ID and a name > Book - Has an id(isbn) and an ElementCollection of Listings > Listing - An embeddable that has a ManyToOne relationship to Seller, a price and comments. > The scenario is as follows: > * Create all the sellers. > * Create a book. > * Add a listing to each book. Each listing takes a Seller Entity and a price. > * When I commit the book, the seller_id column in my Listing join table is always zero. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.