Hi Craig, Andy, Erik,

I'm testing a kind of inheritance mapping using strategy "new-table" where each table contains columns for all fields. Thus, a table of a subclass contains columns for the declared fields *and* for the fields of all superclasses, e.g. this is the orm metadata of classes "Insurance" and "DentalInsurance":

<orm>
    <package name="org.apache.jdo.tck.pc.company">
        ...
        <class name="Insurance" table="insuranceplans">
            <inheritance strategy="new-table"/>
            <field name="insid" column="INSID" primary-key="true"/>
            <field name="carrier" column="CARRIER"/>
            <field name="employee" column="EMPLOYEE">
                 <foreign-key/>
            </field>
        </class>

        <class name="DentalInsurance" table="dentalinsurance">
            <inheritance strategy="new-table">
                <join column="INSID"/>
            </inheritance>
            <field name="insid" column="INSID" primary-key="true"/>
            <field name="carrier" column="CARRIER"/>
            <field name="employee" column="EMPLOYEE">
                 <foreign-key/>
            </field>
<field name="lifetimeOrthoBenefit" column="LIFETIME_ORTHO_BENEFIT"/>
        </class>
        ...
    </package>
</orm>

The Completeness test throws an exception applying this mapping ("org.jpox.metadata.InvalidMetaDataException: Class org.apache.jdo.tck.pc.company.DentalInsurance has field org.apache.jdo.tck.pc.company.DentalInsurance.carrier declared in MetaData, but this field doesnt exist in the class!").

My question: Is this a valid mapping, if fields of superclasses are repeated in the orm metadata of subclasses?

Regards,
Michael
--
-------------------------------------------------------------------
Michael Watzek                  [EMAIL PROTECTED] Engineering GmbH
mailto:[EMAIL PROTECTED]        Buelowstr. 66
Tel.:  ++49/30/235 520 36       10783 Berlin - Germany
Fax.:  ++49/30/217 520 12       http://www.spree.de/
-------------------------------------------------------------------

Reply via email to