i refer this link but it does not work for me...

following code does not work :

String query = "PATH:\"/app:company_home/cm:Customer_Relationship_Management/cm:Business_Documents/cm:Orders/*\"+@crm\\:uniqueDocId:\"" + orderId + "\"";
            List<NodeRef> nodeRefs = CRMUtils.executeLuceneQuery(query);

NodeRef parentRef = nodeRefs.get(0);

List<ChildAssociationRef> childRef = AlfrescoServiceRegistry.getServiceRegistry().getNodeService().getChildAssocs(parentRef, ContentModel.ASSOC_CONTAINS, RegexQNamePattern.MATCH_ALL);

when i debugged this code i got parentRef and its correct but then following line i got empty childRef...

if you have any another solution then plz help me...

有帮助吗?

解决方案

Try the following methods of NodeService:

getSourceAssocs(NodeRef nodeRef, QNamePattern qnamePattern) or 
getTargetAssocs(NodeRef nodeRef, QNamePattern qnamePattern) 

This may solve your problem.

其他提示

What is the name of your child association? The second parameter in getChildAssocs(NodeRef nodeRef, QNamePattern typeQNamePattern, QNamePattern qnamePattern) reflects association qname. Maybe your child association qname is not ContentModel.ASSOC_CONTAINS?

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top