<?xml version="1.0" encoding="UTF-8" ?>
		<!DOCTYPE hibernate-mapping PUBLIC
		    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
		    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

		<hibernate-mapping
		    default-lazy="false"
		    auto-import="true"
		    default-access="property"
		    default-cascade="all"
		    package="gov.va.med.esr.common.model.person">

		    <class
		        name="PreferredLanguage"
		        table="PERSON_PREFERRED_LANGUAGE">

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

				<many-to-one
		            name="person"
		            class="gov.va.med.esr.common.model.person.Person"
		            cascade="none"
		            insert="true"
		            update="false">
					<column name="PERSON_ID" />
		        </many-to-one>
				
				<many-to-one
		            name="language"
		            class="gov.va.med.esr.common.model.lookup.Language"
		            outer-join="false"
		            cascade="none"
		            not-null="true"
		            insert="true"
		            update="true">
		            <column name="STD_LANGUAGECODE_ID" />
		        </many-to-one>
				
				<property
		            name="languageEntryDate"
		            type="java.util.Date"
		            column="LANGUAGE_ENTRY_DATE"/>
					
				<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>
