0 Replies Latest reply on Sep 13, 2004 3:09 AM by davout

    CMR - adding a child - how does tyhis work?

    davout Newbie

      I'm a little confused about how a CMP entity bean that has 1-M relationship link to a subordinate entity should handle the creation new subordinate entity instances.

      For instance,...

      class Entity1Bean {
      Collection getEntity2List() // returns collection of 'Entity2'

      class Entity2Bean {

      At the moment I'm handling the creation of new Entity2 instances by....


      However, when I then use 'Entity1Home.getEntity2List' to retrieve a list of
      linked sub entities the newly created Entity2 instance is not part of the

      I then tried adding.....

      aNewEntity1 = Entity2Home.create(....)

      ... and it still didn't work. What am I doing wrong?