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 [EMAIL PROTECTED] Engineering GmbH
Tel.: ++49/30/235 520 36 10783 Berlin - Germany
-------------------------------------------------------------------