2 Replies Latest reply on May 20, 2004 6:44 PM by rolf

    General EJB relationship question

    rolf


      Let's say I have two Entity Beans A and B.
      The relashionship between them is mxn.

      A have a getBs() method that return a Collection of B and B have a
      getAs() method that return a Collection of A.

      No how do I add two new beans.

      1) NewA = home.create()
      2) NewB = home2.create()
      3) Collection bs = NewA.getBs();
      4) bs.add(NewB);

      If this is the right way why do I have to perform step 3 & 4

      Cheers
      Rolf






      bs.add(b);