mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
MT - fix delete node (to ensure tenant-specific re-index)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8143 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -759,7 +759,7 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
|
||||
invokeBeforeDeleteNode(nodeRef);
|
||||
|
||||
// get the primary parent-child relationship before it is gone
|
||||
ChildAssociationRef childAssocRef = getPrimaryParent(nodeRef);
|
||||
ChildAssociationRef childAssocRef = tenantService.getName(getPrimaryParent(nodeRef)); //note: tenant-specific for re-indexing
|
||||
// get type and aspect QNames as they will be unavailable after the delete
|
||||
QName nodeTypeQName = node.getTypeQName();
|
||||
Set<QName> nodeAspectQNames = node.getAspects();
|
||||
@@ -1255,13 +1255,7 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
|
||||
// no match - ignore
|
||||
continue;
|
||||
}
|
||||
ChildAssociationRef childAssocRef = new ChildAssociationRef(
|
||||
assoc.getChildAssocRef().getTypeQName(),
|
||||
tenantService.getBaseName(assoc.getChildAssocRef().getParentRef()),
|
||||
assoc.getChildAssocRef().getQName(),
|
||||
tenantService.getBaseName(assoc.getChildAssocRef().getChildRef()),
|
||||
assoc.getChildAssocRef().isPrimary(),
|
||||
assoc.getChildAssocRef().getNthSibling());
|
||||
ChildAssociationRef childAssocRef = tenantService.getBaseName(assoc.getChildAssocRef());
|
||||
results.add(childAssocRef);
|
||||
}
|
||||
// done
|
||||
@@ -1357,12 +1351,7 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
|
||||
}
|
||||
else
|
||||
{
|
||||
assocRef = new ChildAssociationRef(assoc.getChildAssocRef().getTypeQName(),
|
||||
tenantService.getBaseName(assoc.getChildAssocRef().getParentRef()),
|
||||
assoc.getChildAssocRef().getQName(),
|
||||
tenantService.getBaseName(assoc.getChildAssocRef().getChildRef()),
|
||||
assoc.getChildAssocRef().isPrimary(),
|
||||
assoc.getChildAssocRef().getNthSibling());
|
||||
assocRef = tenantService.getBaseName(assoc.getChildAssocRef());
|
||||
}
|
||||
return assocRef;
|
||||
}
|
||||
|
Reference in New Issue
Block a user