<?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.hbp">

    <class name="HealthBenefitPlanDescription"
        table="HEALTH_BENEFIT_PLAN_DESC_H"
		dynamic-insert="true"
		dynamic-update="true">
				
        <id
            name="identifier"
            type="big_decimal"
            column="HLTH_BEN_PLAN_DESC_ID">
            <generator class="gov.va.med.fw.persistent.hibernate.BigSequenceGenerator">
                <param name="sequence">HEALTH_BENEFIT_PLAN_DESC_S</param>
            </generator>
        </id>

		<version name="version" type="integer" column="RECORD_MODIFIED_COUNT"/>	

  		<many-to-one name="planDefinition" class="HealthBenefitPlanDefinition" cascade="none" insert="true" update="false">
           <column name="HEALTH_BENEFIT_PLAN_DETAIL_ID" />			
		</many-to-one>
 
 		<property name="description"
			type="org.springframework.orm.hibernate3.support.ClobStringType"
			column="HLTH_BEN_PLAN_DESCRIPTION" not-null="true"/>
 
        <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"/>
 		<property name="transactionType" column="TRANSACTION_TYPE_CODE" type="gov.va.med.fw.persistent.hibernate.TransactionUserType"/>
   		<property name="historyId" column="HLTH_BEN_PLAN_DESC_H_ID" type="big_decimal" insert="false" update="false"/>

		<filter name="asOfDate"></filter>
		<filter name="priorToDate"></filter>
    </class>
  
</hibernate-mapping>