Hi,

did you take a look on castor JDO example. There is a class PC that extends class 
Product.
Take care on the implementation of class Product that implements Persistent interface 
and
overwrites jdoLoad() methode.

Ralf


----- Original Message -----
From: "Techeira, Vincent X -ND" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 13, 2003 4:31 AM
Subject: [castor-dev] Loading Extended Objects


> I have a class B extends from.  They have appropriated get/set methods.  If I store 
> an instance of B, it stores the necessary data
for A.  When I try to load B however I don't get any of the values of A.
>
> Am I missing something obvious...  Consider the code and xml below.
>
>
> class A
> {
> int id;
> String data
>
> //get/set methods
> ...
>
> }
>
> class B extends A
> {
>  String otherData;
>
> // get /set methods
> ...
> }
>
> <class auto-complete="false" name="A" access="shared" identity="id">
>         <map-to table="A" />
>         <field required="true" name="id" type="integer" >
>             <sql name="id"  type="integer"/>
>         </field>
>        <field required="true" name="data" type="string" >
>             <sql name="data"  type="varchar"/>
>         </field>
> </class>
>
> <class auto-complete="false" name="A" extends="B" access="shared" identity="id">
>         <map-to table="A" />
>         <field required="true" name="id" type="integer" >
>             <sql name="id"  type="integer"/>
>         </field>
>        <field required="true" name="otherData" type="string" >
>             <sql name="other_data"  type="varchar"/>
>         </field>
> </class>
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>         unsubscribe castor-dev
>

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to