<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!-- Generated 2008. 9. 1 ???? 1:00:43 by Hibernate Tools 3.2.1.GA -->
<hibernate-mapping>
    <class name="anyframe.sample.model.bidirection.Country" table="COUNTRY" lazy="true" schema="PUBLIC">
        <id name="countryCode" type="string">
            <column name="COUNTRY_CODE" length="12" />
            <generator class="assigned" />
        </id>
        <property name="countryId" type="string">
            <column name="COUNTRY_ID" length="2" not-null="true" />
        </property>
        <property name="countryName" type="string">
            <column name="COUNTRY_NAME" length="50" not-null="true" />
        </property>
        <set name="movies" inverse="true" cascade="save-update">
            <key>
                <column name="COUNTRY_CODE" length="12" />
            </key>
            <one-to-many class="anyframe.sample.model.bidirection.Movie" />
        </set>
    </class>
    
    <query name="findCountryList">
    	<![CDATA[	
    	FROM Country country
    	WHERE country.countryName like :condition 
    	ORDER BY country.countryName
    	]]>
    </query>    
    
    <sql-query name="nativeFindCountryList">
    	<return alias="country" class="anyframe.sample.model.bidirection.Country"/>
    	<![CDATA[	
    	SELECT * 
    	FROM COUNTRY country
    	WHERE country.COUNTRY_NAME like :condition 
    	ORDER BY country.COUNTRY_NAME
    	]]>
    </sql-query>
</hibernate-mapping>

