<?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 package="gov.va.med.esr.common.model.comms">
	<class name="AacErrorReasonLink" table="COM_AAC_ERROR_DETAIL">

        <id name="identifier" type="big_decimal" column="COM_AAC_ERROR_DETAIL_ID">
            <generator class="gov.va.med.fw.persistent.hibernate.BigSequenceGenerator">
                <param name="sequence">transaction_s</param>
            </generator>
        </id>
		<version name="version" type="integer" column="RECORD_MODIFIED_COUNT"/>	

		<!-- associations to other table -->
				
		<!-- lookup tables -->
		<many-to-one
            name="aacErrorType"
            class="gov.va.med.esr.common.model.lookup.ComAACErrorType"
            outer-join="false"
            cascade="none"
            not-null="true"
            insert="true"
            update="true">
            <column name="COM_AAC_ERROR_TYPE_ID" />
        </many-to-one>
		
		<many-to-one name="commsLog" class="CommsLogEntry" column="COM_MAILING_ID"/>
			
		
		<!-- ADR required attributes -->
		
        <property name="createdOn" column="RECORD_CREATED_DATE" type="timestamp" not-null="true" update="false"/>
        <property name="modifiedOn" column="RECORD_MODIFIED_DATE" type="timestamp" not-null="true"/>
        <property name="createdBy" column="RECORD_CREATED_BY" update="false" 
            type="gov.va.med.fw.persistent.hibernate.AuditUserType"/>
        <property name="modifiedBy" column="RECORD_MODIFIED_BY" 
            type="gov.va.med.fw.persistent.hibernate.AuditUserType"/>
    </class>
</hibernate-mapping>