Return-Path: Delivered-To: apmail-incubator-open-jpa-dev-archive@locus.apache.org Received: (qmail 41667 invoked from network); 24 Apr 2007 17:21:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Apr 2007 17:21:31 -0000 Received: (qmail 17367 invoked by uid 500); 24 Apr 2007 17:21:37 -0000 Delivered-To: apmail-incubator-open-jpa-dev-archive@incubator.apache.org Received: (qmail 17340 invoked by uid 500); 24 Apr 2007 17:21:37 -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 17331 invoked by uid 99); 24 Apr 2007 17:21:37 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2007 10:21:37 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of plinskey@bea.com designates 66.248.192.39 as permitted sender) Received: from [66.248.192.39] (HELO repmmg02.bea.com) (66.248.192.39) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2007 10:21:29 -0700 Received: from repmmr02.bea.com (repmmr02.bea.com [10.160.30.72]) by repmmg02.bea.com (Switch-3.2.5/Switch-3.2.5) with ESMTP id l3OHL7HE002121 for ; Tue, 24 Apr 2007 10:21:07 -0700 Received: from repbex02.amer.bea.com (repbex02.bea.com [10.160.26.99]) by repmmr02.bea.com (Switch-3.2.5/Switch-3.2.5) with ESMTP id l3OHL6la018285 for ; Tue, 24 Apr 2007 10:21:06 -0700 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: 7bit Subject: RE: Open JPA error-Could not locate metadata for the class using alias Date: Tue, 24 Apr 2007 10:20:40 -0700 Message-ID: <7D856CDFE035FF45A0420ACBD71BDD6303FB5EB9@repbex02.amer.bea.com> In-Reply-To: <10106645.post@talk.nabble.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Open JPA error-Could not locate metadata for the class using alias Thread-Index: AceDdFN5QxXIQyGTRwe5YLYb/t2fmQDIE+Cw References: <625027.94080.qm@web8510.mail.in.yahoo.com> <10095774.post@talk.nabble.com> <1b5bfeb50704200452y29780d0epf3eb7cbc0cb4c574@mail.gmail.com> <10100315.post@talk.nabble.com> <10101376.post@talk.nabble.com> <4628F3E9.3070302@sun.com> <10106645.post@talk.nabble.com> From: "Patrick Linskey" To: x-BEA-PMX-Instructions: AV x-BEA-MM: Internal-To-External X-Virus-Checked: Checked by ClamAV on apache.org Note that in OpenJPA, you could fully specify all your relations as relations between the abstrat entity classes or mapped superclasses (so AbstractPerson would have a reference to AbstractAddress, etc.) and then narrow the types of the relations in the subclasses. This would allow you to create something where your reverse-engineered classes fully compiled on their own, and also would result in an efficient schema with direct relations between the concrete subtypes. -Patrick -- Patrick Linskey BEA Systems, Inc. _______________________________________________________________________ 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. > -----Original Message----- > From: tbee [mailto:tbee@tbee.org] > Sent: Friday, April 20, 2007 10:20 AM > To: open-jpa-dev@incubator.apache.org > Subject: Re: Open JPA error-Could not locate metadata for the > class using alias > > > > > Marina Vatkina wrote: > > > > The spec defines the following limitations of a MappedSuperclass: > > > > 2.1.9.2 Mapped Superclasses > > ... > > A mapped superclass, unlike an entity, is not queryable and > cannot be > > passed as an argument to EntityManager or Query operations. > A mapped > > superclass cannot be the target of a persistent relationship. > > > > > > Correct. It is not. All relations refer to the inheriting > classes. So even if the relation is defined in the > @MappedSuperclass, the result of the relation are the actual @Entity. > > I believe this approach is invaluable if you want to save > coding time: my reverse engineering class generates a JPA > MappedSuperclass based on the database and the actual Entity > class only contains the JPA table annotation and all business logic. > > Hibernate also has some trouble with this concept, but > Toplink works fine. I have an issue with lazy loading there, > but the approach is perfect. > > -- > View this message in context: > http://www.nabble.com/Open-JPA-error-Could-not-locate-metadata > -for-the-class-using-alias-tf3561516.html#a10106645 > Sent from the open-jpa-dev mailing list archive at Nabble.com. > > 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.