2 Replies Latest reply on Apr 18, 2002 1:01 PM by dsundstrom

    Problem with relation table

    miriam

      Hello!
      I'm using many to many relation between 2 entity beans. Everything works fine but when I make undeploy the relational table is not dropped. What do I have to do so that the table is deleted?
      My jbosscmp-jdbc.xml contains the following lines related to the relational table:

      .........
      <preferred-relation-mapping>relation-table</preferred-relation-mapping>
      ..........

      <ejb-relation>
      <ejb-relation-name>Company-Employee</ejb-relation-name>
      <relation-table-mapping>
      <table-name>xxxx</table-name>
      <create-table>true</create-table>
      <remove-table>true</remove-table>
      </relation-table-mapping>
      <ejb-relationship-role>
      <ejb-relationship-role-name>Company-has-employee</ejb-relationship-role-name>
      <key-fields>
      <key-field>
      <field-name>cod_c</field-name>
      <column-name>codc1</column-name>
      </key-field>
      </key-fields>
      </ejb-relationship-role>
      <ejb-relationship-role>
      <ejb-relationship-role-name>An-employee-belongs-to-some-companies</ejb-relationship-role-name>
      <key-fields>
      <key-field>
      <field-name>cod_e</field-name>
      <column-name>code1</column-name>
      </key-field>
      </key-fields>
      </ejb-relationship-role>
      </ejb-relation>


      If someone has the answer, please tell me.