code: public void deleteMtoNImplementor(CollectionDescriptor cod, Object obj, Iterator collectionIterator, Collection mnKeys)
      {
          if(mnKeys.isEmpty() || collectionIterator == null)
          {
              return;
          }
          List workList = new ArrayList(mnKeys);
          MtoNBroker.Key relatedObjKeys;
          ClassDescriptor relatedCld = pb.getDescriptorRepository().getDescriptorFor(cod.getItemClass());
          Object relatedObj;
  
          // remove keys of relatedObject from the existing m:n rows in workList
          while(collectionIterator.hasNext())
          {
              relatedObj = collectionIterator.next();
              relatedObjKeys = new MtoNBroker.Key(pb.serviceBrokerHelper().getKeyValues(relatedCld, relatedObj, true));
              workList.remove(relatedObjKeys);
          }
  
          // delete all remaining keys in workList
          ClassDescriptor cld = pb.getDescriptorRepository().getDescriptorFor(obj.getClass());
          ValueContainer[] pkValues = pb.serviceBrokerHelper().getKeyValues(cld, obj);
  
          String[] pkColumns = cod.getFksToThisClass();
          String[] fkColumns = cod.getFksToItemClass();
          String table = cod.getIndirectionTable();
          String deleteStmt;
  
          ValueContainer[] fkValues;
          Iterator iter = workList.iterator();
          while(iter.hasNext())
          {
              fkValues = ((MtoNBroker.Key) iter.next()).m_containers;
              deleteStmt = pb.serviceSqlGenerator().getDeleteMNStatement(table, pkColumns, fkColumns);
              pb.serviceJdbcAccess().executeUpdateSQL(deleteStmt, cld, pkValues, fkValues);
          }
      }
docs: deletes all rows from m:n table that are not used in relatedObjects
  
  @param cod
  @param obj
  @param collectionIterator
  @param mnKeys