<!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Mapping DTD Version 1.0//EN"
                           "http://castor.exolab.org/mapping.dtd">
<mapping>
  <class name="jdo.tc166.Lazy1to1Parent" identity="id">
    <map-to table="lazy_11_par" />
    <field name="id" type="integer" >
      <sql name="id" type="integer"/>
    </field>
    <field name="description" type="string">
      <sql name="descr" type="varchar"/>
    </field>
    <field name="child" type="jdo.tc166.Lazy1to1Child" lazy="true">
      <sql name="child_id" />
    </field>
  </class>
  
  <class name="jdo.tc166.Lazy1to1Child" identity="id" >
    <map-to table="lazy_11_chd" />
    <field name="id" type="integer" >
      <sql name="id" type="integer" />
    </field>
    <field name="description" type="string">
      <sql name="descr" type="varchar" />
    </field>
  </class>
  
  <class name="jdo.tc166.Lazy1to1Author" identity="id">
    <cache-type type="unlimited" capacity="0"/>
    <map-to table="lazy_11_author"/>
    <field name="id" type="long">
      <sql name="ID" type="bigint"/>
    </field>
    <field name="firstName" type="string">
      <sql name="FIRST_NAME" type="char"/>
    </field>
    <field name="lastName" type="string">
      <sql name="LAST_NAME" type="char"/>
    </field>
    <field name="books" type="jdo.tc166.Lazy1to1Book" lazy="true" collection="collection">
      <sql many-key="ID"/>
    </field>
  </class>
	
  <class name="jdo.tc166.Lazy1to1Book" identity="id">
    <cache-type type="unlimited" capacity="0"/>
    <map-to table="lazy_11_book"/>
    <field name="id" type="long">
      <sql name="ID" type="bigint"/>
    </field>
    <field name="name" type="string">
      <sql name="NAME" type="char"/>
    </field>
    <field name="author" type="jdo.tc166.Lazy1to1Author" required="true" lazy="true">
      <sql name="AUTHOR_ID"/>
    </field>
  </class>
</mapping>
