You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by "Spräner, Carsten" <Ca...@viadee.de> on 2003/06/18 15:31:32 UTC
Mapping One Class One Table Second Edition
Hey all,
finaly we got it working (nearly)! Just one peace is missing.
We have the following situation. Logically we have to Classes
A
B derived from A
Physically we use a generator where every class is derived from a generated class. Thus we have the situation:
AGenerated
AImpl derived from AGenerated
BGenerated derived from AImpl
BImpl derived from BGenereated
The generator only mapps the Class AImpl and BImpl to the tables TAB_A and TAB_B.
When OJB 1.0RC3 starts it says that BImpl is not a subclass of AImpl and gives an error. Looking to the code it retrieves the direct superclass of BImpl and finds BGenerated. Is this correct or should'nt it be:
Is AImpl assignable from BImpl?
Which works in our case at least for the reading of the repository.xml.
IMPL<------------IMPL
Is this structure of Impl<-Generated<-Impl<-Generated possible at all in OJB or MUST the subclass be derived directly from the superclass?
Thank you for any answer and of course for developing OJB.
carsten