I have attempted your suggestion:

In C's class descriptor:

        <reference-descriptor name="super" class-ref="A"
auto-update="true">
      <foreignkey field-ref="mId" />
    </reference-descriptor>

In A's class descriptor:
<extent-class class-ref="C" />

However,  I still receive the error message: 
Caused by: org.apache.ojb.broker.metadata.MetadataException: Class A is
not a superclass of class C
Preventing ojb from loading repository.xml and starting up

Could I be missing something else? 


-----Original Message-----
From: Thomas Dudziak [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 08, 2004 1:44 PM
To: OJB Users List
Subject: Re: 2nd try: inheritance issues


Mindy Pereira wrote:

>I am still having no luck mapping the following relationship:
>
>A
>
>B extends A
>
>C extends B
>
> 
>
>The relationships between B and A and C and B are mapping correctly. 
>However, obj seems unaware of the relationship between C and A:
>
>Caused by: org.apache.ojb.broker.metadata.MetadataException: Class A is

>not a superclass of class C
>
>when I include:
>
><reference-descriptor name="super" class-ref="A" auto-update="true">
>
><foreignkey field-ref="mId" />
>
></reference-descriptor>
>
>However, not including that line means that the fields inherited by 
>class C from class A are not recognized when saving an object of class
C.
>
>Can anyone offer any advice? Does ojb not support this sort of 
>relationship?
>  
>
You specified A in the reference descriptor, not B, so I guess you want 
to bypass B in this mapping. For this to work, B should not be declared 
in the repository.xml and you need an extent-class in the class 
descriptor of A that points to C.
If you did not want to bypass B, then the super-reference should point 
to B, not to A.

Tom


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to