<?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="save-update">
    <class name="gov.va.med.cds.clinicaldata.VhimVersionWrapper" table="VHIM_VERSION" lazy="false">
        <id type="java.lang.Long" >
            <column name="VHIM_VERSION_ID" />
 			<generator class="sequence">
				<param name="sequence">vhim_version_seq_id</param>
			</generator>
        </id>

		<property name="version" column="VHIM_VERSION_TXT" type="java.lang.String" unique="true"/>

	</class>



    <query name="VhimVersionText">
		<![CDATA[
		from VhimVersionWrapper vvw
		where vvw.version = :vhimVersionTxt
      ]]>
	</query>


	<sql-query name="AllVhimVersions">
		<![CDATA[
		select vhim_version_txt from tfrlocal.Vhim_Version
      ]]>
	</sql-query>

</hibernate-mapping>
