0 Replies Latest reply on Aug 25, 2004 9:48 AM by noleto

    CMP-CMR between BMP with compound primary key. Why?

    noleto

      Hi all,

      I have the following:
      One BMP entity (CursoDisciplinaBean - mapping a table on another datasource) with compound primary key (curso, disciplina) that works very well. I'm creating a CMP entity (ItemEmergencial) that has a relationship with BMP CursoDisciplinaBean but when the application is deployed the following error occur: CursoDisciplina not found for relation...

      Here is a fragment of jbosscmp-jdbc.xml:
      <ejb-relation>
      <ejb-relation-name>ItemPedidoEmergencial-CursoDisciplina</ejb-relation-name>
      <ejb-relationship-role>
      <ejb-relationship-role-name>ItemPedidoEmergencial-feito-CursoDisciplina</ejb-relationship-role-name>
      <fk-constraint>true</fk-constraint>
      <key-fields/>
      </ejb-relationship-role>
      <ejb-relationship-role>
      <ejb-relationship-role-name>CursoDisciplina-solicita-ItemPedidoEmergencial</ejb-relationship-role-name>
      <key-fields>
      <key-field>
      <field-name>curso</field-name>
      <column-name>ID_CURSO</column-name>
      </key-field>
      <key-field>
      <field-name>disciplina</field-name>
      <column-name>ID_DISCIPLINA</column-name>
      </key-field>
      </key-fields>
      </ejb-relationship-role>
      </ejb-relation>

      I'm using Jboss, xdoclet, eclipse and MS SQL Server.

      someone know what is the problem?

      thank you all,

      Daniel Noleto