<?xml version="1.0" encoding="UTF-8"?>

<jdo>
    <package name="tutorial.jdo">
        <class name="Animal" table="ANIMAL">
            <datastore-identity column="ID"/>
            <inheritance>
                <discriminator strategy="class-name" column="TYP" indexed="true"/>
            </inheritance>
            <version strategy="version-number" column="VERSN" indexed="true"/>
            <field name="name" column="NAME0"/>
            <field name="price" column="PRICE"/>
        </class>
        <class name="Dog">
            <inheritance strategy="superclass-table"/>
        </class>
        <class name="Rabbit">
            <inheritance strategy="superclass-table"/>
            <field name="parents" table="ANIMA_PARENTS">
                <collection element-type="Rabbit"/>
                <join column="ID" indexed="true"/>
                <element column="ELEMENT" indexed="true"/>
            </field>
            <field name="children" mapped-by="parents">
                <collection element-type="Rabbit"/>
            </field>
            <field name="eater" column="EATER" indexed="true"/>
            <field name="isDead" column="ISDEAD"/>
            <field name="isFemale" column="ISFEMALE"/>
        </class>
        <class name="Snake">
            <inheritance strategy="superclass-table"/>
            <field name="giTract" mapped-by="eater">
                <collection element-type="Rabbit"/>
            </field>
            <field name="length" column="LENGTH0"/>
        </class>
    </package>
</jdo>