1 Reply Latest reply on Jan 9, 2003 8:27 AM by steinarc

    how to correctly remove CMR managed child entities?

    steinarc

      Given two EJBs "Master" -----(1..*) ---> "Detail".

      What is the corret way of removing all "Detail" objects belonging to "Master" ?

      I have tried this:

      for (Iterator iter=master.getDetails().iterator();iter.hasNext();) {
      Detail detail = (Detail)iter.next();
      detail.remove();
      }

      But only the first of two "Detail" objects are removed.

      Where did I go wrong?