<!DOCTYPE databases PUBLIC "-//EXOLAB/Castor Mapping DTD Version 1.0//EN"
                           "http://castor.exolab.org/mapping.dtd">

<!--
======================================================
Mapping for Container-Managed Persistence EntityBeans
in the Default CMP Container
======================================================

Referenced By: 
    conf/cmp_global_tx_database.xml 
    conf/cmp_local_tx_database.xml  

This is the mapping file for the Default CMP Container
 defined in the conf/service-jar.xml file.

Other CMP containers can be configured.  Each container
will need a Global_TX_Database and a Local_TX_Database 
plus a mappling file like this one.

The Default CMP Container uses:

Global_TX_Database   conf/cmp.instantdb.global-database.xml
Local_TX_Database    conf/cmp.instantdb.local-database.xml

Both point to this mapping file:
                     conf/cmp.instantdb.xml


[The Syntax of this file is defined by Castor]
-->
<mapping>

  <!--  Mapping for ProductGroup  -->
  <class name="org.openejb.test.entity.cmp.BasicCmpBean" 
         identity="primaryKey">
    <description>Simple Entity Bean</description>
    
    <map-to table="entity" />
    
    <field name="primaryKey" type="integer" direct="true" >
      <sql name="id" type="integer"/>
    </field>
    
    <field name="firstName" type="string" direct="true" >
      <sql name="first_name" type="char" dirty="check" />
    </field>
  
    <field name="lastName" type="string" direct="true" >
      <sql name="last_name" type="char" dirty="check" />
    </field>
  
  
  </class>
  
  <!--  Mapping for AllowedOperationsCmpBean  -->
  <class name="org.openejb.test.entity.cmp.AllowedOperationsCmpBean" 
         identity="primaryKey">
    <description>Simple Entity Bean</description>
    
    <map-to table="entity" />
    
    <field name="primaryKey" type="integer" direct="true" >
      <sql name="id" type="integer"/>
    </field>
    
    <field name="firstName" type="string" direct="true" >
      <sql name="first_name" type="char" dirty="check" />
    </field>
  
    <field name="lastName" type="string" direct="true" >
      <sql name="last_name" type="char" dirty="check" />
    </field>
  
  
  </class>
  
  <class name="org.openejb.test.entity.cmp.EncCmpBean" 
         identity="primaryKey">
    <description>Simple Entity Bean</description>
    
    <map-to table="entity" />
    
    <field name="primaryKey" type="integer" direct="true" >
      <sql name="id" type="integer"/>
    </field>
    
    <field name="firstName" type="string" direct="true" >
      <sql name="first_name" type="char" dirty="check" />
    </field>
  
    <field name="lastName" type="string" direct="true" >
      <sql name="last_name" type="char" dirty="check" />
    </field>
  
  
  </class>


  <class name="org.openejb.test.entity.cmp.RmiIiopCmpBean" 
         identity="primaryKey">
    <description>Simple Entity Bean</description>
    
    <map-to table="entity" />
    
    <field name="primaryKey" type="integer" direct="true" >
      <sql name="id" type="integer"/>
    </field>
    
    <field name="firstName" type="string" direct="true" >
      <sql name="first_name" type="char" dirty="check" />
    </field>
  
    <field name="lastName" type="string" direct="true" >
      <sql name="last_name" type="char" dirty="check" />
    </field>
  
  
  </class>


</mapping>

