AnsweredAssumed Answered

getChildAssocs(NodeRef) not returning all child nodes?

Question asked by fnduy on Dec 14, 2007
Latest reply on Jun 5, 2009 by kevinr
Hello,

I am using Alfresco 2.1 Community, and I am trying to retrieve all the child nodes of a folder (sourceDir). So I use this code:

ApplicationContext context = ApplicationContextHelper.getApplicationContext();
ServiceRegistry serviceRegistry = (ServiceRegistry) context.getBean(ServiceRegistry.SERVICE_REGISTRY);
NodeService nodeService = serviceRegistry.getNodeService();
List<ChildAssociationRef> sourceChildNodesRef = nodeService.getChildAssocs(sourceDir);

The folder contains a relatively large number of file (325 files), but nodeService.getChildAssocs only returns 270 files. If I run the program in debug mode (with eclipse), I only have about 40 files (?!).

Has anyone got this problem?

Thank you in advance for any help.

Outcomes