mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)
78501: Merged V4.2-BUG-FIX (4.2.4) to HEAD-BUG-FIX (5.0/Cloud) 76817: MNT-11756: Merged DEV to V4.2-BUG-FIX (4.2.4) 76808: MNT-11756: Associated nodes deleted when reverting to older version. - Keep secondary association during revert if versioned and current node have child association with the same node git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@82573 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1275,6 +1275,7 @@ public class Version2ServiceImpl extends VersionServiceImpl implements VersionSe
|
||||
if (children.contains(versionedChild) == false)
|
||||
{
|
||||
NodeRef childRef = null;
|
||||
ChildAssociationRef assocToKeep = null;
|
||||
if (this.nodeService.exists(versionedChild.getChildRef()) == true)
|
||||
{
|
||||
// The node was a primary child of the parent, but that is no longer the case. Despite this
|
||||
@@ -1292,6 +1293,7 @@ public class Version2ServiceImpl extends VersionServiceImpl implements VersionSe
|
||||
if (children.contains(assocToCheck))
|
||||
{
|
||||
childRef = assocToCheck.getChildRef();
|
||||
assocToKeep = assocToCheck;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1326,7 +1328,14 @@ public class Version2ServiceImpl extends VersionServiceImpl implements VersionSe
|
||||
}
|
||||
if (childRef != null)
|
||||
{
|
||||
children.remove(nodeService.getPrimaryParent(childRef));
|
||||
if (assocToKeep != null)
|
||||
{
|
||||
children.remove(assocToKeep);
|
||||
}
|
||||
else
|
||||
{
|
||||
children.remove(nodeService.getPrimaryParent(childRef));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user