cancel
Showing results for 
Search instead for 
Did you mean: 

ORDER BY Name

ashved
Champ in-the-making
Champ in-the-making
Hello,

I am trying to retrieve sorted documents by name with CMIS query. My query looks very simple:

select * from document where IN_FOLDER('workspace://SpacesStore/cdeb288c-da2b-4cc9-8881-68fc311e67db') ORDER BY Name

As result of this query I have documents in some random order, not alphabetically sorted by name. (I have also tried to order by some other properties: modification Date, document size; with such order results are sorted correctly)

Currently I am working with Alfresco version 3.0.0 (Stable 1526), using air CMIS Explorer to execute this query.

What can be reason of incorrect alphabetical order of documents:
- Am I doing something wrong?
- Is it some bug in alfresco version I am working with?
- Probably, is it solved in some future versions?

Thank You in advance!
1 REPLY 1

jake-hyland
Champ in-the-making
Champ in-the-making
Your syntax looks right, but in my own testing I have found that the ORDER BY clause tends to not work correctly. It does change the order of the results, but not in any consistent way that I can figure out. Looks like if you want them in a specific order you are going to need to do it yourself.

I have tried this on 3.0, but because my preview build 3.2 is messed up at the moment I haven't checked that.