Joined: Fri Jan 16, 2004 3:13 am Posts: 4
|
Hi,
I've a question about inheritance in context of code generation.
I want to generate the annotated model classes as superclasses.
(code generation from an UML model as base)
e.g.
Generated superclass:
@Entity
@Table(name="USER")
public class UserAbstract implements java.io.Serializable {
...
}
These generated classes should act as superclasses for concrete classes which are implemented by hand.
Subclass:
public class User extends UserAbstract
..
}
Is this possible for the annotation model? When I annotate a superclass and use a subclass for persistence I get Exceptions when I try to persist the object with the EntityManager ==>
Exception in thread "main" java.lang.IllegalArgumentException: Unknown entity: User
It seems that the concrete instance has to be annotated.
Could anybody give me a hint how to solve such problems?
TIA
Martin
|
|