for(Enumeration e = relatedObjects.immutableClone().objectEnumerator(); e.hasMoreElements(); ) {
EOEnterpriseObject relatedObject = (EOEnterpriseObject)e.nextElement();
EOEnterpriseObject pickedObject = (EOEnterpriseObject)relatedObject.valueForKey(pickRelationshipName);
if(!selectedObjects.containsObject(pickedObject)) {
eo.removeObjectFromBothSidesOfRelationshipWithKey(relatedObject, relationshipName);
ec.deleteObject(relatedObject);
}
}
NSArray pickedObjects = (NSArray)eo.valueForKeyPath(relationshipName +"." + pickRelationshipName +".@unique");
EOEntity entity = ERXEOAccessUtilities.destinationEntityForKeyPath(ERXEOAccessUtilities.entityForEo(eo), relationshipName);
for(Enumeration e = selectedObjects.objectEnumerator(); e.hasMoreElements(); ) {