<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>

    <class name="org.biojavax.ontology.SimpleComparableOntology" table="ontology" node="ontology" entity-name="Ontology">

        <id name="id" type="integer" unsaved-value="null" column="ontology_id" node="@id">
            <generator class="native"/>
        </id>

        <property name="name" node="@name"/>
        <property name="description" column="definition"/>
        <set name="termSet" lazy="false" inverse="true" cascade="all-delete-orphan" sort="natural">
            <key column="ontology_id"/>
            <one-to-many class="Term" embed-xml="true"/>
        </set>
        <set name="tripleSet" lazy="false" inverse="true" cascade="all-delete-orphan" sort="natural">
            <key column="ontology_id"/>
            <one-to-many class="Triple" embed-xml="true"/>
        </set>
                
    </class>

</hibernate-mapping>