3 Replies Latest reply on Jun 8, 2004 2:47 AM by aloubyansky

    CMP - wrong data with jboss > 3.2.1

    idocoding

      hi folks,

      i have a problem that occurs only with jboss >= 3.2.3 (including 4.0) and my molimo (http://www.molimo.de) application (source available) - jboss 3.2.1 works fine.
      there is a entity bean called ThingBean, with two 1:n relation to itself (one in attribute father, one in attribute type)

      it has the followin query method defined:


      <query-method>
      <method-name>ejbSelectChildren</method-name>
      <method-params>
      <method-param>de.molimo.server.ThingLocal</method-param>
      </method-params>
      </query-method>
      <ejb-ql>SELECT Object(t) FROM ThingBean AS t WHERE t.father=?1 OR t.type=?1</ejb-ql>


      here's the relationship for type (analog for father)

      <ejb-relation>
      <ejb-relation-name>Thing - Type</ejb-relation-name>
      <ejb-relationship-role>
      <ejb-relationship-role-name>Thing - Type.thing</ejb-relationship-role-name>
      Many
      <relationship-role-source>
      <ejb-name>ThingBean</ejb-name>
      </relationship-role-source>
      <cmr-field>
      <cmr-field-name>type</cmr-field-name>
      </cmr-field>
      </ejb-relationship-role>
      <ejb-relationship-role>
      <ejb-relationship-role-name>Thing - Type.type</ejb-relationship-role-name>
      One
      <relationship-role-source>
      <ejb-name>ThingBean</ejb-name>
      </relationship-role-source>
      </ejb-relationship-role>
      </ejb-relation>


      now the problem:

      imagine a thing has one child (one thing with father==this exists, verified in database), so a call to
      ejbSelectChildren(ctx.getEJBLocalObject())
      should deliver a collection with one child (it does this with 3.2.1)
      but beginning with 3.2.3 it does return a collection of 254-times the same thing.

      hope this helps you folks -

      thanks,

      marcus