diff --git a/source/java/org/alfresco/cmis/mapping/CMISServicesImpl.java b/source/java/org/alfresco/cmis/mapping/CMISServicesImpl.java index 1cd8163815..ed1d02afc9 100644 --- a/source/java/org/alfresco/cmis/mapping/CMISServicesImpl.java +++ b/source/java/org/alfresco/cmis/mapping/CMISServicesImpl.java @@ -1458,7 +1458,19 @@ public class CMISServicesImpl implements CMISServices, ApplicationContextAware, } versionService.deleteVersionHistory(nodeRef); } - + + // Remove not primary parent associations + List childAssociations = nodeService.getParentAssocs(nodeRef); + if (childAssociations != null) + { + for (ChildAssociationRef childAssoc : childAssociations) + { + if (!childAssoc.isPrimary()) + { + nodeService.removeChildAssociation(childAssoc); + } + } + } // Attempt to delete the node nodeService.deleteNode(nodeRef); }