Merged 5.1.N (5.1.2) to 5.2.N (5.2.1)

125333 rneamtu: Merged 5.1.1 (5.1.1) to 5.1.N (5.1.2)
      125215 bhorje: ACE-5308 set valid parent association qname 


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@125440 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Ancuta Morarasu
2016-04-15 12:15:32 +00:00
parent f12308b25d
commit b6cc69db9b
2 changed files with 9 additions and 1 deletions

View File

@@ -817,9 +817,14 @@ public class VirtualNodeServiceExtension extends VirtualSpringBeanExtension<Node
}
NodeRef referenceNodeRef = reference.toNodeRef();
Map<QName, Serializable> refProperties = smartStore.getProperties(reference);
Serializable childName = refProperties.get(ContentModel.PROP_NAME);
QName childAssocQName = QName
.createQNameWithValidLocalName(VirtualContentModel.VIRTUAL_CONTENT_MODEL_1_0_URI,
childName.toString());
ChildAssociationRef assoc = new ChildAssociationRef(ContentModel.ASSOC_CONTAINS,
parentNodeRef,
NodeArchiveService.QNAME_ARCHIVED_ITEM,
childAssocQName,
referenceNodeRef,
true,
-1);