This one time, at band camp, [EMAIL PROTECTED] said:

><!DOCTYPE databases PUBLIC "-//EXOLAB/Castor Mapping DTD Version 1.0//EN"
>                           "http://castor.exolab.org/mapping.dtd";>
>
><mapping>
>       <!--  Mapping for com.vwfs.Customer  -->
>       <class name="com.vwfs.Customer" identity="iCustomerID"
>key-generator="MAX">
>
>       <description>com.vwfs.Customer</description>
>       <map-to table="customers" xml="customer" />
>
>       <field name="iCustomerID" type="integer" get-method="getCustomerID"
>set-method="setCustomerID">
>               <sql name="customer_id" type="integer" />
>               <xml name="customer_id" node="element" />
>       </field>
...
></mapping>
>
...
><mapping>
>       <!--  Mapping for com.vwfs.Corporation  -->
>       <class name="com.vwfs.Corporation"
>extends="com.vwfs.VolumeCustomer">
>
>       <description>com.vwfs.Corporation</description>
>       <map-to table="customers" xml="customer" />
>
>       <field name="sCompanyName" type="string" get-method="getCompanyName"
>set-method="setCompanyName">
>               <sql name="company_name" type="char" />
>               <xml name="company_name" node="element" />
>       </field>
>
>     </class>
></mapping>

Andrew,

It appears to me that the Corporation object does not specify an
identity attribute (primary key) in the class element.

Taken from http://castor.exolab.org/tips-tricks.html#JDO:-Inheritence:

    "With relation inheritence, one table provides the base information and
     another table provides additional information using the same primary
     keys in both."

See also the example mapping between Computer and Product in
src/examples/jdo/mapping.xml.

Hope this helps.

Bruce
--

perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'

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

Reply via email to