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


<hibernate-mapping default-lazy="false" default-cascade="none">
    <class entity-name="SurveyQuestion" table="SURVEY_QUESTION" lazy="true" name="gov.va.med.cds.template.generated.surveyscommon.SurveyQuestion">
        <id type="java.lang.Long" name="id">
            <column name="SURVEY_QUESTION_ID"/>
            <generator class="sequence" >
				<param name="sequence">survey_question_seq_id</param>
			</generator>
        </id>

		<property name="questionNumber" column="QUESTION_NUMBER" type="integer"/>

		<property name="questionText" column="QUESTION_TEXT" type="java.lang.String"/>

        <!--  one-to-many sets -->
        <list name="surveyChoices" >
			<key column="SURVEY_QUESTION_ID" update="false" />
			<list-index column="CHOICE_NUMBER"  />
			<one-to-many entity-name="SurveyChoice"/>
		</list>
        
    </class>

</hibernate-mapping>

