<!DOCTYPE jbosscmp-jdbc PUBLIC "-//JBoss//DTD JBOSSCMP-JDBC 4.0//EN"
    "http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_4_0.dtd">
<jbosscmp-jdbc>
  <enterprise-beans>
    <entity>
      <ejb-name>EntityEJB</ejb-name>

      <datasource>JNDIDatasource</datasource>
      <create-table>true</create-table>
      <drop-table>true</drop-table>

      <table-name>EntityTable</table-name>
      <cmp-field>
        <field-name>fieldName</field-name>
        <column-name>columnName</column-name>
        <sql-type>sqlType</sql-type>
      </cmp-field>
    </entity>
  </enterprise-beans>

  <relationships>
    <ejb-relation>
      <ejb-relation-name>RelationName</ejb-relation-name>
      <relation-table-mapping>
        <table-name>RelationTable</table-name>
      </relation-table-mapping>
      <ejb-relationship-role>
        <ejb-relationship-role-name>Role1Name</ejb-relationship-role-name>
        <key-fields>
          <key-field>
            <field-name>Role1FieldName1</field-name>
            <column-name>Role1ColumnName1</column-name>
          </key-field>
          <key-field>
            <field-name>Role1FieldName2</field-name>
            <column-name>Role1ColumnName2</column-name>
          </key-field>
        </key-fields>
      </ejb-relationship-role>
      <ejb-relationship-role>
        <ejb-relationship-role-name>Role2Name</ejb-relationship-role-name>
        <key-fields>
          <key-field>
            <field-name>Role2FieldName1</field-name>
            <column-name>Role2ColumnName1</column-name>
          </key-field>
          <key-field>
            <field-name>Role2FieldName2</field-name>
            <column-name>Role2ColumnName2</column-name>
          </key-field>
        </key-fields>
      </ejb-relationship-role>
    </ejb-relation>
  </relationships>
</jbosscmp-jdbc>
