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 93625D947 for ; Tue, 25 Sep 2012 17:36:08 +0000 (UTC) Received: (qmail 43247 invoked by uid 500); 25 Sep 2012 17:36:08 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 43172 invoked by uid 500); 25 Sep 2012 17:36:08 -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 43083 invoked by uid 99); 25 Sep 2012 17:36:08 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Sep 2012 17:36:08 +0000 Date: Wed, 26 Sep 2012 04:36:07 +1100 (NCT) From: "Albert Lee (JIRA)" To: dev@openjpa.apache.org Message-ID: <2055409023.123807.1348594568030.JavaMail.jiratomcat@arcas> In-Reply-To: <1412627795.10814.1344007862611.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (OPENJPA-2247) JoinColumn annotation is ignored when mapping a unidirectional owned OneToOne that is in a SecondaryTable 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-2247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13463014#comment-13463014 ] Albert Lee commented on OPENJPA-2247: ------------------------------------- Fix committed under revision 1369042 to trunk. > JoinColumn annotation is ignored when mapping a unidirectional owned OneToOne that is in a SecondaryTable > --------------------------------------------------------------------------------------------------------- > > Key: OPENJPA-2247 > URL: https://issues.apache.org/jira/browse/OPENJPA-2247 > Project: OpenJPA > Issue Type: Bug > Components: kernel > Affects Versions: 2.2.0, 2.3.0 > Reporter: Rick Curtis > Assignee: Rick Curtis > Fix For: 2.3.0 > > > The runtime incorrectly ignores @JoinColumn.name when mapping a unidirectional owned OneToOne that is in a SecondaryTable. > This problem only exists when running with a persistence.xml that is set to 2.0 (version="2.0">). > For example: > @Entity > @SecondaryTable(name = "ParentSecondaryTable", pkJoinColumns = > { @PrimaryKeyJoinColumn(name = "idParent", referencedColumnName = "idParent") }) > public class Parent { > @Id > @GeneratedValue > int idParent; > String child_ref; > @OneToOne > @JoinColumn(name = "CHILD_REF", table = "ParentSecondaryTable", referencedColumnName = "idChild") > PChild child; > } > The column "CHILD_REF" will be ignored and the runtime will look for the fk in non-existent column ParentSecondaryTable.CHILD_IDCHILD. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira