Hi tbee,

I've only seen bits and pieces of this issue scattered through a dozen emails. I understand vaguely that you're trying to separate the persistent field definition from the behavior, but can't really understand how you're trying to do it.

Would it be possible for you to post a complete (simple) example that shows what you are trying to do, including both the classes and the database schema, for both sides of the relationship.

Thanks,

Craig

On Apr 24, 2007, at 9:21 AM, Marina Vatkina wrote:

tbee wrote:
Marina Vatkina wrote:
I didn't suggest to remove the existing @Entity annotation - what I
suggested was to change the @MappedSuperclass to be an @Entity, *and* make it
*abstract*.
The latter will mean that you'll never get its instances back.

I've tested this, but OpenJPA still has the same error:
org.apache.openjpa.persistence.ArgumentException: Could not locate metadata
for the class using alias "Article". Registered alias mappings:
"{Article=null}"
As a comparison, Toplink does not accept this approach at all (@Entity extends @Entity). It requires the superclass to be MappedSuperclass (@Entity
extends @MappedSuperclass).

This is close to impossible as there are probably CTS tests that use an @Entity that extends another @Entity. Are you using JPA in an EE 5 container? Otherwise you need to list all antities and mapped superclasses in your persistence.xml.

-marina

So unforntunately this approach seems to be a dead end.


Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:[EMAIL PROTECTED]
P.S. A good JDO? O, Gasp!

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to