db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michelle Caisse <Michelle.Cai...@Sun.COM>
Subject Re: Company Metadata
Date Mon, 18 Apr 2005 04:44:39 GMT
Erik,

Thanks, I will fix the typos in the metadata.  I've copied this to 
jdo-experts-ext so they can respond to your question in point 1 
regarding columns in a superclass table that map to fields of a subclass..

-- Michelle

erik@jpox.org wrote:

>Hi,
>
>I have some metadata notes for the company model (package-derby.orm):
>
>1. the column salary must allow null, and if we look in the java class, it's a
>double value. Should the metadata explicit says the column is null or it's
>implied by the fact it's a subclass using superclass-table strategy?
>
>        <class name="FullTimeEmployee">
>            <inheritance strategy="superclass-table"/>
>            <field name="salary" column="SALARY"/>
>        </class>
>
>
>        <class name="FullTimeEmployee">
>            <inheritance strategy="superclass-table"/>
>            <field name="salary">
>            	<column name="SALARY" allows-null="true"/>
>            </field>
>        </class>
>
>2. The mapped-by attribute for fields employees and fundedEmps is not using the
>correct case. The below is correct
>
>        <class name="Department" table="departments">
>            <datastore-identity strategy="identity" column="ID"/>
>            <field name="name" column="NAME"/>
>            <field name="company" column="COMPANYID"/>
>            <field name="employees" mapped-by="department"/>
>            <field name="fundedEmps" mapped-by="fundingDept"/>
>        </class>
>
>3. The field "insid" must be removed from the Insurance class when under the
>orm/datastoreidentity folder.
>
>        <class name="Insurance" table="insuranceplans">
>            <inheritance strategy="new-table">
>                <discriminator strategy="class-name" column="DISCRIMINATOR"/>
>            </inheritance>
>            <field name="insid" column="INSID" primary-key="true"/>
>
>Regards,
>
>Erik Bengtson
>  
>


Mime
View raw message