<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "classpath://org/hibernate/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="storybook.model.hbn.entity">
    <class discriminator-value="-1" name="AbstractTaglink" table="TAG_LINK">
        <id
            column="ID"
            name="id"
            type="java.lang.Long"
            unsaved-value="null">
            <generator class="increment"/>
        </id>
        <discriminator column="type" type="integer"/>
        <property
            column="creation"
            name="creation"
            type="java.lang.String"
            insert="true"
            update="true"
        />
        <property
            column="maj"
            name="maj"
            type="java.lang.String"
            insert="true"
            update="true"
        />
        <property
            column="name"
            name="name"
            type="java.lang.String"
            insert="true"
            update="true"
        />
        <property
            column="description"
            name="description"
            length="32768"
            type="java.lang.String"
            insert="true"
            update="true"
        />
        <property
            column="notes"
            name="notes"
            length="32768"
            type="java.lang.String"
            insert="true"
            update="true"
        />
        <property
            column="assistant"
            name="assistant"
            length="32768"
            type="java.lang.String"
            insert="true"
            update="true"
        />
        <property
            column="type"
            name="type"
            type="java.lang.Integer"
            insert="false"
            update="false"
        />
        <many-to-one
            column="start_scene_id"
            name="startScene"
            class="storybook.model.hbn.entity.Scene"
            cascade="none"
            lazy="false"
            outer-join="auto"
            insert="true"
            update="true"
        />
        <many-to-one
            column="end_scene_id"
            name="endScene"
            class="storybook.model.hbn.entity.Scene"
            cascade="none"
            lazy="false"
            outer-join="auto"
            insert="true"
            update="true"
        />
        <many-to-one
            column="character_id"
            name="person"
            class="storybook.model.hbn.entity.Person"
            cascade="none"
            lazy="false"
            outer-join="auto"
            insert="true"
            update="true"
        />
        <many-to-one
            column="location_id"
            name="location"
            class="storybook.model.hbn.entity.Location"
            cascade="none"
            lazy="false"
            outer-join="auto"
            insert="true"
            update="true"
        />
        <subclass discriminator-value="0"    name="Taglink">
            <many-to-one
                column="tag_id"
                name="tag"
                class="Tag"
                cascade="none"
                insert="true"
                outer-join="auto"
                update="true"
            />
        </subclass>
        <subclass discriminator-value="1"    name="Itemlink">
            <many-to-one
                column="tag_id"
                name="item"
                class="Item"
                cascade="none"
                outer-join="auto"
                insert="true"
                update="true"
            />
        </subclass>
    </class>
</hibernate-mapping>
