Return-Path: Delivered-To: apmail-incubator-open-jpa-dev-archive@locus.apache.org Received: (qmail 24149 invoked from network); 10 Dec 2006 20:28:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Dec 2006 20:28:32 -0000 Received: (qmail 91833 invoked by uid 500); 10 Dec 2006 20:28:40 -0000 Delivered-To: apmail-incubator-open-jpa-dev-archive@incubator.apache.org Received: (qmail 91803 invoked by uid 500); 10 Dec 2006 20:28:39 -0000 Mailing-List: contact open-jpa-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: open-jpa-dev@incubator.apache.org Delivered-To: mailing list open-jpa-dev@incubator.apache.org Received: (qmail 91786 invoked by uid 99); 10 Dec 2006 20:28:39 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Dec 2006 12:28:39 -0800 X-ASF-Spam-Status: No, hits=1.9 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of ppoddar@bea.com designates 66.248.192.22 as permitted sender) Received: from [66.248.192.22] (HELO usremg02.bea.com) (66.248.192.22) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Dec 2006 12:28:28 -0800 Received: from usremr01.bea.com (usremr01.bea.com [10.160.29.91]) by usremg02.bea.com (Switch-3.2.2/Switch-3.2.2) with ESMTP id kBAKS6Kf015043 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Sun, 10 Dec 2006 12:28:06 -0800 Received: from repbfe01.amer.bea.com (webmail.wideip.bea.com [10.160.26.100]) by usremr01.bea.com (Switch-3.2.2/Switch-3.2.2) with ESMTP id kBAKRqRY020579 for ; Sun, 10 Dec 2006 12:28:05 -0800 Received: from repbex01.amer.bea.com ([10.160.26.98]) by repbfe01.amer.bea.com with Microsoft SMTPSVC(6.0.3790.1830); Sun, 10 Dec 2006 12:27:27 -0800 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: OneToOne Broken Date: Sun, 10 Dec 2006 12:27:13 -0800 Message-ID: <5C219175D559A64D8C2CC65E41D36856853BC7@repbex01.amer.bea.com> In-Reply-To: <1282BAB4-6F7B-4BEA-86D7-D8E7F1A8B69A@iq80.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: OneToOne Broken Thread-Index: Accceat5cv/jmRXMTxu+9/aow5eFtgAH2JqA From: "Pinaki Poddar" To: X-OriginalArrivalTime: 10 Dec 2006 20:27:27.0193 (UTC) FILETIME=[9BBF5490:01C71C99] X-PMX-Version: 4.7.1.128075, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2006.11.17.61432 X-Virus-Checked: Checked by ClamAV on apache.org > I agree, but wanted the smallest test code possible :) The classes that access public persistent fields are persistence-aware (they themselves may or may not be persitence-capable). The test classes are persistence-aware in this case. Persistence-aware classes need to be enhanced also.=20=20 Pinaki Poddar BEA Systems 415.402.7317=20=20 -----Original Message----- From: Dain Sundstrom [mailto:dain@iq80.com]=20 Sent: Sunday, December 10, 2006 8:38 AM To: open-jpa-dev@incubator.apache.org Subject: Re: OneToOne Broken On Dec 9, 2006, at 9:01 PM, Craig L Russell wrote: > Hi Dain, > > You don't have a relationship from Article to Magazine, so it's a=20 > unidirectional mapping. Are you sure? If you uncomment the line that is commented out in testResourceLocal it works. I assume that means that I do have a relationship since OpenJPA is correctly filling in the fk column. > Add a Magazine mag; field in Article and see if it starts working. That is the way I originally had the test code, but I wanted to create the smallest test code possible, so I remove it. Anyway, I just added a "public Magazine magazine" field to the Article class and added this to the test-mappings.xml file: ...and it still fails. > You will also need to identify the "owner" of the relationship in=20 > order to make it work at all. I thought when I declare the "join-column" in the Magazine.coverArticle field, that made it the owner. How do I declare the owner of the relationship? > Just a note, JPA does not do well with unidirectional relationships.=20 > There is more unspecified than specified there. OK. I'll avoid them > And public fields are JPA for evil. I agree, but wanted the smallest test code possible :) > Craig Thanks Craig, -dain _______________________________________________________________________ Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.