<?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 name="Chapter" table="CHAPTER">
        <id column="ID" name="id" type="java.lang.Long" unsaved-value="null">
            <generator class="increment">
            </generator>
        </id>
        <!-- common data -->
        <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"
                  length="256"
                  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"/>
        <!-- specific data -->
        <property column="title"
                  name="title"
                  length="256"
                  type="java.lang.String"
                  insert="true"
                  update="true"/>
        <many-to-one column="part_id"
                     name="part"
                     cascade="none"
                     insert="true"
                     lazy="false"
                     outer-join="auto"
                     update="true"/>
        <property column="chapterno"
                  name="chapterno"
                  type="java.lang.Integer"
                  insert="true"
                  update="true"/>
        <property column="creation_ts"
                  name="creationTime"
                  type="java.sql.Timestamp"
                  insert="true"
                  update="true"/>
        <property column="objective_ts"
                  name="objectiveTime"
                  type="java.sql.Timestamp"
                  insert="true"
                  update="true"/>
        <property column="done_ts"
                  name="doneTime"
                  type="java.sql.Timestamp"
                  insert="true"
                  update="true"/>
        <property column="objective_ch"
                  name="objectiveChars"
                  type="java.lang.Integer"
                  insert="true"
                  update="true"/>
    </class>
</hibernate-mapping>
