0 Replies Latest reply on Oct 28, 2002 4:35 AM by rajiv_t

    CMP2.0 creating relationship error

    rajiv_t

      Hi,

      I am trying to use CMR for 1 (ParentBean) to Many ( ChildBean )relationships. On running from the client I get 'duplicate column name error'. My DB is already created & I dont want to drop & create DB everytime. Can any one help me in how to disable creation of column while defining relations as , I understand by default it creates a column.

      I have defined the relationship in the jbosscmp-jdbc.xml
      as

      <ejb-relation>
      <ejb-relation-name>ParentBean-ChildBean</ejb-relation-name>
      <foreign-key-mapping/>

      <ejb-relationship-role>
      <ejb-relationship-role-name>ParentBean-Has-ChildBean </ejb-relationship-role-name>
      <key-fields>
      <key-field>
      <field-name>excmpt_Seq_Id</field-name>
      <column-name>EXCMPT_SEQ_ID</column-name>
      </key-field>
      </key-fields>
      </ejb-relationship-role>

      <ejb-relationship-role>
      <ejb-relationship-role-name>ChildBean -belongsto-ParentBean</ejb-relationship-role-name>
      <key-fields/>
      </ejb-relationship-role>

      </ejb-relation>


      Any pointers to this are most welcome. Please reply to my id also.

      Thanks in Advance
      Rajiv