openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey" <plins...@bea.com>
Subject RE: Open JPA error-Could not locate metadata for the class using alias
Date Tue, 24 Apr 2007 17:20:40 GMT
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.

Mime
View raw message