2 Replies Latest reply on Nov 11, 2004 3:39 AM by aloubyansky

    remove-table=true only removes first table?

    stud

      Hello everybody,
      I have a jar with some EJBs in it. For each of these, <remove-table>true</remove-table> is specified. But when my JAR is undeployed, only the first Bean gets it's table deleted!

      The jbosscmp-jdbc.xml follows, it is Xdoclet generated:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE jbosscmp-jdbc PUBLIC "-//JBoss//DTD JBOSSCMP-JDBC 3.2//EN" "http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_2.dtd">
      
      <jbosscmp-jdbc>
       <defaults>
       <datasource>java:/PostgresDS</datasource>
       <datasource-mapping>PostgreSQL 7.2</datasource-mapping>
       </defaults>
      
       <enterprise-beans>
      
       <!--
       To add beans that you have deployment descriptor info for, add
       a file to your XDoclet merge directory called jbosscmp-jdbc-beans.xml
       that contains the <entity></entity> markup for those beans.
       -->
      
       <entity>
       <ejb-name>User</ejb-name>
       <remove-table>true</remove-table>
      
       <table-name>user_table</table-name>
      
       <cmp-field>
       <field-name>userId</field-name>
      
       </cmp-field>
       <cmp-field>
       <field-name>username</field-name>
      
       </cmp-field>
       <cmp-field>
       <field-name>name</field-name>
      
       </cmp-field>
       <cmp-field>
       <field-name>firstname</field-name>
      
       </cmp-field>
       <cmp-field>
       <field-name>password</field-name>
      
       </cmp-field>
       <cmp-field>
       <field-name>mail</field-name>
      
       </cmp-field>
      
       <entity-command name="postgresql-fetch-seq">
       </entity-command>
      <!-- jboss 3.2 features -->
      <!-- optimistic locking does not express the exclusions needed -->
       </entity>
      
       <entity>
       <ejb-name>Folder</ejb-name>
       <remove-table>true</remove-table>
      
       <table-name>folder_table</table-name>
      
       <cmp-field>
       <field-name>folderId</field-name>
      
       </cmp-field>
       <cmp-field>
       <field-name>name</field-name>
      
       </cmp-field>
      
       <entity-command name="postgresql-fetch-seq">
       </entity-command>
      <!-- jboss 3.2 features -->
      <!-- optimistic locking does not express the exclusions needed -->
       </entity>
      
       </enterprise-beans>
      
       <relationships>
       <ejb-relation>
       <ejb-relation-name>USER has a FOLDER</ejb-relation-name>
       <foreign-key-mapping/>
      
       <ejb-relationship-role>
       <ejb-relationship-role-name>Every USER has one FOLDER</ejb-relationship-role-name>
       <fk-constraint>true</fk-constraint>
       <key-fields/>
      
       </ejb-relationship-role>
       <ejb-relationship-role>
       <ejb-relationship-role-name>Some FOLDERs belong to a USER</ejb-relationship-role-name>
       <key-fields>
       <key-field>
       <field-name>folderId</field-name>
       <column-name>folderFk</column-name>
       </key-field>
       </key-fields>
      
       </ejb-relationship-role>
       </ejb-relation>
       <!--
       To add jboss relationships for beans not managed by XDoclet, add
       a file to your XDoclet merge directory called jbosscmp-jdbc-relationships.xml that contains
       the <ejb-relation></ejb-relation> markups for those beans.
       -->
       </relationships>
      
      </jbosscmp-jdbc>


      Despite that, only the user_table gets deleted!

      What do I wrong?
      Thanks in advance for any help,
      Stud