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 "Weaver, Scott" <Sw...@rippe.com> on 2003/06/23 20:27:57 UTC
extents and mapping inheritence
Is there anyway to have a class-descriptor inherit the mappings of a previously defined class-descriptor?
Example:
AB is an interface. A implements AB and B extends A.
<class-descriptor class="AB" >
<extent-class class-ref="A" />
<extent-class class-ref="B" />
</class-descriptor>
<class-descriptor class="A" table="AB">
<field-descriptor name="id"column="ID" jdbc-type="INTEGER"
primarykey="true"
autoincrement="true"
/>
<field-descriptor name="name" column="NAME" jdbc-type="VARCHAR"/>
</class-descriptor>
The question: How can define the class-descriptor for B without having to copy the identical mappings from A?
I tried using the "extends" attribute of class-descriptor on hunch that's what it was for, however, no dice.
There has got to be a simple way to accomplish this, however, I have yet to find it.
Using 1.0rc3.
Thanks,
*===================================*
* Scott T Weaver *
* Jakarta Jetspeed Portal Project *
* weaver@apache.org *
*===================================*
Re: extents and mapping inheritence
Posted by Leandro Rodrigo Saad Cruz <le...@ibnetwork.com.br>.
I have inherence working for collection descriptors. I'm planning to add
reference and field inherence too. When I have time :-(
On Mon, 2003-06-23 at 16:02, Jakob Braeuchi wrote:
> hi scott,
>
> ojb does not support inheritence of field- and relationship-descriptors.
> but there are some discussions going on regarding this feature.
>
> hth
> jakob
>
> Weaver, Scott wrote:
>
> >Is there anyway to have a class-descriptor inherit the mappings of a previously defined class-descriptor?
> >
> >Example:
> >
> >AB is an interface. A implements AB and B extends A.
> >
> ><class-descriptor class="AB" >
> > <extent-class class-ref="A" />
> > <extent-class class-ref="B" />
> ></class-descriptor>
> >
> >
> ><class-descriptor class="A" table="AB">
> > <field-descriptor name="id"column="ID" jdbc-type="INTEGER"
> > primarykey="true"
> > autoincrement="true"
> > />
> > <field-descriptor name="name" column="NAME" jdbc-type="VARCHAR"/>
> ></class-descriptor>
> >
> >The question: How can define the class-descriptor for B without having to copy the identical mappings from A?
> >
> >I tried using the "extends" attribute of class-descriptor on hunch that's what it was for, however, no dice.
> >
> >There has got to be a simple way to accomplish this, however, I have yet to find it.
> >
> >Using 1.0rc3.
> >
> >Thanks,
> >*===================================*
> >* Scott T Weaver *
> >* Jakarta Jetspeed Portal Project *
> >* weaver@apache.org *
> >*===================================*
> >
> >
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
--
Leandro Rodrigo Saad Cruz
IT - Inter Business Tecnologia e Servicos (IB)
http://www.ibnetwork.com.br
http://db.apache.org/ojb
http://xingu.sourceforge.net
Re: extents and mapping inheritence
Posted by Jakob Braeuchi <jb...@gmx.ch>.
hi scott,
ojb does not support inheritence of field- and relationship-descriptors.
but there are some discussions going on regarding this feature.
hth
jakob
Weaver, Scott wrote:
>Is there anyway to have a class-descriptor inherit the mappings of a previously defined class-descriptor?
>
>Example:
>
>AB is an interface. A implements AB and B extends A.
>
><class-descriptor class="AB" >
> <extent-class class-ref="A" />
> <extent-class class-ref="B" />
></class-descriptor>
>
>
><class-descriptor class="A" table="AB">
> <field-descriptor name="id"column="ID" jdbc-type="INTEGER"
> primarykey="true"
> autoincrement="true"
> />
> <field-descriptor name="name" column="NAME" jdbc-type="VARCHAR"/>
></class-descriptor>
>
>The question: How can define the class-descriptor for B without having to copy the identical mappings from A?
>
>I tried using the "extends" attribute of class-descriptor on hunch that's what it was for, however, no dice.
>
>There has got to be a simple way to accomplish this, however, I have yet to find it.
>
>Using 1.0rc3.
>
>Thanks,
>*===================================*
>* Scott T Weaver *
>* Jakarta Jetspeed Portal Project *
>* weaver@apache.org *
>*===================================*
>
>
>
>
>
>