mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
ScriptNode addNode() updated to set the child name correctly
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10377 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1303,7 +1303,8 @@ public class ScriptNode implements Serializable, Scopeable
|
||||
public void addNode(ScriptNode node)
|
||||
{
|
||||
ParameterCheck.mandatory("node", node);
|
||||
nodeService.addChild(this.nodeRef, node.nodeRef, ContentModel.ASSOC_CONTAINS, ContentModel.ASSOC_CONTAINS);
|
||||
ChildAssociationRef childAssocRef = this.nodeService.getPrimaryParent(this.nodeRef);
|
||||
nodeService.addChild(this.nodeRef, node.nodeRef, ContentModel.ASSOC_CONTAINS, childAssocRef.getQName());
|
||||
reset();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user