openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tbee <t...@tbee.org>
Subject Re: Open JPA error-Could not locate metadata for the class using alias
Date Fri, 20 Apr 2007 17:19:47 GMT



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.


Mime
View raw message