<?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="com.wisemapping.model.Collaboration" table="COLLABORATION">
        <id name="id">
            <generator class="increment"/>
        </id>

        <property name="roleId" column="ROLE_ID" unique="true" not-null="true"/>

        <!-- Read-only association property -->
        <many-to-one name="mindMap"
                     column="MINDMAP_ID"
                     not-null="true"
                     class="com.wisemapping.model.Mindmap"
                />

        <many-to-one name="collaborator"
                     column="COLABORATOR_ID"
                     not-null="true"
                     class="com.wisemapping.model.Collaborator"
                />


        <many-to-one name="collaborationProperties" class="com.wisemapping.model.CollaborationProperties"
                     column="properties_id" not-null="false" cascade="all" unique="true"/>

    </class>

</hibernate-mapping>