db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@jpox.org
Subject Company Metadata
Date Sun, 17 Apr 2005 10:31:43 GMT
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