1 Reply Latest reply on Oct 18, 2002 4:08 AM by Shafei Jomohat

    Jboss 3.0.3 & SQL2000 error

    Shafei Jomohat Newbie

      Hi..

      I have 2 entity beans - Job and User (1:N).
      I'm getting this error from SQL2k when i create a new User:

      Column name 'Job_Id' appears more than once in the result column list.

      Here's the relationship in ejb-jar:

      <ejb-relation>
      <ejb-relation-name>Job-User</ejb-relation-name>
      <ejb-relationship-role>
      <ejb-relationship-role-name>Job-Of-User</ejb-relationship-role-name>
      One
      <relationship-role-source>
      <ejb-name>JobEJB</ejb-name>
      </relationship-role-source>
      </ejb-relationship-role>
      <ejb-relationship-role>
      <ejb-relationship-role-name>user-has-job</ejb-relationship-role-name>
      Many
      <relationship-role-source>
      <ejb-name>UserEJB</ejb-name>
      </relationship-role-source>
      <cmr-field>
      <cmr-field-name>jobLocal</cmr-field-name>
      </cmr-field>
      </ejb-relationship-role>
      </ejb-relation>


      And here's the relationship in jbosscmp-jdbc:


      <ejb-relation>
      <ejb-relation-name>Job-User</ejb-relation-name>
      <foreign-key-mapping/>
      <ejb-relationship-role>
      <ejb-relationship-role-name>Job-Of-User</ejb-relationship-role-name>
      <key-fields>
      <key-field>
      <field-name>id</field-name>
      <column-name>Job_Id</column-name>
      </key-field>
      </key-fields>
      </ejb-relationship-role>
      <ejb-relationship-role>
      <ejb-relationship-role-name>user-has-job</ejb-relationship-role-name>
      <key-fields/>
      </ejb-relationship-role>
      </ejb-relation>


      Is there something wrong with my descriptors ?

      Anyone tried to use LIKE in EJB-QL together with an input parameter ?

      Thanks in advance