Differences between revisions 3 and 4
Revision 3 as of 2005-02-10 00:18:54
Size: 5364
Comment:
Revision 4 as of 2009-09-20 23:08:50
Size: 5364
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

This is the default mapping of the Company model.

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE jdo PUBLIC "-//Sun Microsystems, Inc.//DTD Java Data Objects Metadata 1.0//EN" "http://java.sun.com/dtd/jdo_1_0.dtd">

<orm>
    <package name="org.apache.jdo.tck.pc.company">

        <class name="Company" table="companies">
            <field name="companyid" column="id"/>                
            <field name="name" column="name"/>                
            <field name="founded" column="foundeddate"/>                
            <field name="address">
                <embedded>
                    <field name="street" column="street"/>
                    <field name="city" column="city"/>
                    <field name="state" column="state"/>
                    <field name="zipcode" column="zipcode"/>
                    <field name="country" column="country"/>
                </embedded>
            </field>
            <field name="departments" mapped-by="company"/>
        </class>

        <class name="DentalInsurance">
            <inheritance strategy="superclass-table"/>
            <field name="lifetimeOrthoBenefit" column="lifetimeOrthoBenefit"/>
        </class>

        <class name="Department" table="departments">
            <field name="deptid" 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>

        <class name="Employee" table="employees">
            <inheritance strategy="new-table">
                <discriminator strategy="class-name" column="discriminator"/>
            </inheritance>
            <field name="firstname"/>
            <field name="lastname"/>
            <field name="middlename"/>
            <field name="address">
                <embedded>
                    <field name="street" column="street"/>
                    <field name="city" column="city"/>
                    <field name="state" column="state"/>
                    <field name="zipcode" column="zipcode"/>
                    <field name="country" column="country"/>
                </embedded>
            </field>
            <field name="phoneNumbers" table="employee_phoneno_type" >
                <join column="personid"/>
                <key column="type"/>
                <value column="phoneno"/>
            </field>
            <field name="hiredate" column="hiredate"/>
            <field name="weeklyhours" column="weeklyhours"/>
            <field name="dentalInsurance" column="dentalinsurance">
                <foreign-key/>
            </field>
            <field name="medicalInsurance" column="medicalinsurance">
                <foreign-key/>
            </field>
            <field name="department" column="department">
                <foreign-key/>
            </field>
            <field name="fundingDept" column="fundingdept">
                <foreign-key/>
            </field>
            <field name="manager" column="manager">
                <foreign-key/>
            </field>
            <field name="mentor" column="mentor">
                <foreign-key/>
            </field>
            <field name="protege" column="protege">
                <foreign-key/>
            </field>
            <field name="hradvisor" column="hradvisor">
                <foreign-key/>
            </field>
            <field name="reviewedProjects" mapped-by="reviewers"/>
            <field name="projects" mapped-by="members"/>
            <field name="team" mapped-by="manager"/>
            <field name="hradvisees" mapped-by="hradvisor"/>
        </class>

        <class name="FullTimeEmployee">
            <inheritance strategy="superclass-table"/>
        </class>

        <class name="Insurance" table="insuranceplans">
            <inheritance strategy="new-table">
                <discriminator strategy="class-name" column="discriminator"/>
            <inheritance/>
            <field name="insid" column="insid"/>
            <field name="carrier" column="carrier"/>
            <field name="employee" mapped-by="dentalInsurance" mapped-by="medicalInsurance"/>
        </class>

        <class name="MedicalInsurance">
            <inheritance strategy="superclass-table"/>
            <field name="planType" column="planType"/>
        </class>

        <class name="PartTimeEmployee">
            <inheritance strategy="superclass-table"/>
        </class>

        <class name="Person" table="employees">
            <inheritance strategy="no-table"/>
        </class>

        <class name="Project" table="projects">
            <field name="projid" column="projid"/>
            <field name="name" column="name"/>
            <field name="budget" column="budget"/>
            <field name="reviewers" table="project_reviewer">
                <join column="projid"/>
                <element column="reviewer">
            </field>
            <field name="members" table="project_member">
                <join column="projid"/>
                <element column="member"/>
            </field>
        </class>
    </package>
</orm>

DefaultMappingMetadata (last edited 2009-09-20 23:08:50 by localhost)