db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Watzek <mwa.t...@spree.de>
Subject Re: Patch implementing inheritance proposal - 1 of 2
Date Mon, 29 Aug 2005 13:22:13 GMT
Hi Andy,

> Hi Michael,
> 
> 
>>- Inheritance mapping 2: 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!
> 
> 
> You have a field in DentalInsurance called "carrier". It isn't qualified with 
> the superclass name. In section 18.14 of the spec (last sentence)
> <spec>
> Subclasses might map fields of their superclasses. In this case, the field 
> name is specified
> as <superclass>.<superclass-field-name>.
> </spec>
> So JPOX's current interpretation is that you have to fully qualify it. Whether 
> this is necessary is open to debate but that's what the spec says
I changed the ORM metadata in order to qualify fields of superclasses. 
Please have a look at the ORM sections below. Is there any mistake? I 
still get the same exception.

         <class name="Insurance">
             <inheritance strategy="subclass-table"/>
         </class>

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

         <class name="MedicalInsurance" table="medicalinsurance">
             <inheritance strategy="new-table"/>
             <field name="Insurance.insid" column="INSID" 
primary-key="true"/>
             <field name="Insurance.carrier" column="CARRIER"/>
             <field name="Insurance.employee" column="EMPLOYEE">
                  <foreign-key/>
             </field>
             <field name="planType" column="PLANTYPE"/>
         </class>

Regards,
Michael
> 
> 
>>- Inheritance mapping 3: org.jpox.metadata.InvalidMetaDataException:
>>Class "org.apache.jdo.tck.pc.company.Employee" has been specified to use
>>"subclass-table" inheritance strategy yet has at least one field that is
>>a Collection/Map. This is not currently supported by JPOX.
> 
> 
> Exactly. Not currently supported.
> 
> 
>>- Inheritance mapping 2: org.jpox.metadata.InvalidMetaDataException:
>>Datastore-identity strategy in class
>>"org.apache.jdo.tck.pc.company.DentalInsurance" ("identity") is not the
>>same as the Datastore-Identity strategy declared in the super class(es)
>>("native").
> 
> 
> This is likely a bug in JPOX that I have a fix here for, but without the 
> actual classes and metadata I can't confirm that
> 
> 


-- 
-------------------------------------------------------------------
Michael Watzek                  Tech@Spree Engineering GmbH
mailto:mwa.tech@spree.de        Buelowstr. 66
Tel.:  ++49/30/235 520 36       10783 Berlin - Germany
Fax.:  ++49/30/217 520 12       http://www.spree.de/
-------------------------------------------------------------------

Mime
View raw message