chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yannick MOLINET (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CMIS-758) GetChildren does not return all children
Date Wed, 26 Feb 2014 20:31:20 GMT

    [ https://issues.apache.org/jira/browse/CMIS-758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13913429#comment-13913429
] 

Yannick MOLINET edited comment on CMIS-758 at 2/26/14 8:30 PM:
---------------------------------------------------------------

I have try your example, and the loop stop at 100 items instead of 272.
so GetChildren do not call next 100 items in the list.

for workaround, I do this

IItemEnumerable<ICmisObject> children = remoteFolder.GetChildren();
IOperationContext newContext = session.CreateOperationContext();

// To avoid 0 that throw an exception
if (children.TotalNumItems > newContext.MaxItemsPerPage)
              newContext.MaxItemsPerPage = children.TotalNumItems;

children = remoteFolder.GetChildren(newContext);


was (Author: ymolinet):
So I do not initialize a variable with GetChildren(), I must used it directly in a loop.

> GetChildren does not return all children
> ----------------------------------------
>
>                 Key: CMIS-758
>                 URL: https://issues.apache.org/jira/browse/CMIS-758
>             Project: Chemistry
>          Issue Type: Bug
>          Components: dotcmis
>    Affects Versions: DotCMIS 0.6
>            Reporter: Yannick MOLINET
>            Assignee: Florian Müller
>             Fix For: DotCMIS 0.6
>
>         Attachments: screenshot-1.jpg, screenshot-2.jpg
>
>
> GetChildren does not return all children
> The source code below returns only the items from the first page, instead of the full
content.
> So if remoteFolder contains more than 100 items, only the first 100 items are returned.
> Note: Default context is used, so PageNumItems is 100.
> foreach (ICmisObject cmisObject in remoteFolder.GetChildren())
> {
> }
> Thanks,
> Yannick



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message