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 Joerg Lensing <in...@softcon-lensing.de> on 2003/03/04 11:56:33 UTC

automatically mapping inherited fields

hi,
is it possible to map "base"-fields from a base-class?

Base-class: BaseX.class
                    fields: name, number

(concrete) inherited classes:  

-->ExtendedBaseX_A
-->ExtendedBaseX_B
.....|_________->ExtendedBaseX_B_xyz

all Classes need the same fields "name" and "number". They allways use 
the same
tablefieldnames (same and separate tables). Is there a way to map these 
two fields
automatically to the tables?

joerg




Re: automatically mapping inherited fields

Posted by Joerg Lensing <in...@softcon-lensing.de>.
hi thomas,
this was exactly my question.
joerg

Thomas Mahler schrieb:

> Hi Joerg,
>
> I'm not quite sure if I got your question.
> Are you asking if the field-descriptors for "name" and "number" must 
> be present in the class-descriptors for the concrete classes, or if it 
> is possible to just define them once in the base-classes descriptor?
>
> The answer to this question is: No,they have to be defined in each 
> concrete classes class-descriptor!
>
> Thomas
>
> Joerg Lensing wrote:
>
>> hi,
>> is it possible to map "base"-fields from a base-class?
>>
>> Base-class: BaseX.class
>>                    fields: name, number
>>
>> (concrete) inherited classes: -->ExtendedBaseX_A
>> -->ExtendedBaseX_B
>> .....|_________->ExtendedBaseX_B_xyz
>>
>> all Classes need the same fields "name" and "number". They allways 
>> use the same
>> tablefieldnames (same and separate tables). Is there a way to map 
>> these two fields
>> automatically to the tables?
>>
>> joerg
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>



Re: automatically mapping inherited fields

Posted by Thomas Mahler <th...@web.de>.
Hi Joerg,

I'm not quite sure if I got your question.
Are you asking if the field-descriptors for "name" and "number" must be 
present in the class-descriptors for the concrete classes, or if it is 
possible to just define them once in the base-classes descriptor?

The answer to this question is: No,they have to be defined in each 
concrete classes class-descriptor!

Thomas

Joerg Lensing wrote:
> hi,
> is it possible to map "base"-fields from a base-class?
> 
> Base-class: BaseX.class
>                    fields: name, number
> 
> (concrete) inherited classes: 
> -->ExtendedBaseX_A
> -->ExtendedBaseX_B
> .....|_________->ExtendedBaseX_B_xyz
> 
> all Classes need the same fields "name" and "number". They allways use 
> the same
> tablefieldnames (same and separate tables). Is there a way to map these 
> two fields
> automatically to the tables?
> 
> joerg
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
>