You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by shivaken <sh...@e-can.ne.jp> on 2003/02/20 10:33:15 UTC
newbie question: OJB cannot treat subclass as superclass?
I'm using polymorphism around my business classes in order to add new
subclasses dose not have unique attribute.
So, I want to add persistence them with OJB
and want to store in the same table. But, it seems to be difficult.
# All subclasses don't have own field.
I created a abstract Call class, and LocalCall class as a subclass of it.
Then broker.store(localCall) causes
org.apache.ojb.broker.metadata.ClassNotPersistenceCapableException:
com.mydomain.LocalCall not found in OJB Repository
I know persistent classes has to have default (no parameter) constructor.
# They seem to be constructed with that. Then, abstract class cannot be used
# with OJB.
Are there any good ways?
-- shivaken