cancel
Showing results for 
Search instead for 
Did you mean: 

getChildren orderBy

karstene
Champ in-the-making
Champ in-the-making
I have a problem with the getChildren web service call with an "order by" parameter. I tested this with the public repository at cmis.alfresco.com/cmisws, for example with the following request:


<ns1:getChildren xsi:type="ns1:getChildren">
  <ns1:repositoryId>371554cd-ac06-40ba-98b8-e6b60275cca7</ns1:repositoryId>
  <ns1:folderId>workspace://SpacesStore/e2b77437-c44b-4828-a3ac-c1d42d92eec2</ns1:folderId>
  <ns1:filter>*</ns1:filter>
  <ns1:orderBy>cmis:baseTypeId, cmis:name</ns1:orderBy>
  <ns1:includeAllowableActions>true</ns1:includeAllowableActions>
  <ns1:includeRelationships>none</ns1:includeRelationships>
  <ns1:renditionFilter xsi:nil="true"/>
  <ns1:includePathSegment xsi:nil="true"/>
  <ns1:maxItems>10</ns1:maxItems>
  <ns1:skipCount>0</ns1:skipCount>
  <ns1:extension xsi:nil="true"/>
</ns1:getChildren>

This call returns a result set of 10 objects, as expected, but they are not ordered at all by the two parameters, cmis:baseTypeId, cmis:name.
I found a similar issue at https://issues.alfresco.com/jira/browse/ALF-12479 but this was related to the old 3.x release.

What I try to do here is to get a list of documents with no folders in between, and ordering by cmis:baseTypeId should show them first in one block.

thanks
Karsten
3 REPLIES 3

janv
Employee
Employee
Hi,

Can you confirm your version of Alfresco … is it Community 4.0.d ? Have you tried the latest nightly build (of Community 4.2 preview) ?

Also, which version of the CMIS web service (WS) endpoint/binding are you using … 3.x or 4.x ? Do they both give the same result ?

Thanks,
Jan

karstene
Champ in-the-making
Champ in-the-making
Jan,

I tested with your public server at cmis.alfresco.com/cmisws, whatever release this is. I am using the new cmisws endpoint.

The same result shows with my internal installation of 4.0d CE, using the 4.x cmisws endpoint. I have not tried with a nightly build, nor with the 3.x endpoint, as this has different issues with my application.

thanks
Karsten

janv
Employee
Employee
Ok, I think I can see the issue here. We do not currently support ordering by "cmis:baseTypeId". If I'm reading it correctly, the 1.0 spec does not specify whether this property should be orderable or not. Please feel free to log a JIRA improvement and we can see whether we can also co-relate with ALF-13968.

Many thanks,
Jan