I have a similar document type stored in couple of folders. I would like select the most recent one using CMIS queries.
Is there a way to accomplish that?
Just sort your query based on cmis:lastModificationDate in descending order and select the first...
i.e.: SELECT * from cmis:document D WHERE (IN_FOLDER(D, 'folderId1') OR IN_FOLDER(D, 'folderId2') ....) ORDER BY D.cmis:lastModificationDate DESC
Any way to limit the results collection to one record?
You should be able to use paging and limits on the request. The CMIS browser binding uses the maxItems and skipCount parameters. I have assumed you are using the CMIS API as you do not say .....Andy
Yes, I am using CMIS API.
Thanks for the hint.
Retrieving data ...