cancel
Showing results for 
Search instead for 
Did you mean: 

a query to retreive all files under a folder.

riteshp1
Champ in-the-making
Champ in-the-making
Hi.
I need to list all documents under a folder if the folder's properties match a search phrase. Can this be done with 1 query ? My current solution is to run 1 query and then use the objectId to fetch all the name of the files using IN_FOLDER(). My company is using Alfresco 3.3 enterprise.


2 REPLIES 2

afaust
Legendary Innovator
Legendary Innovator
Hello,

I think your request might be in the wrong sub-forum, since you are referring to a CMIS specific query.
If I understand correctly, you want all the documents of a variable number of folders but only if the properties of the folder match your search phrase. I don't think this is possible without using a JOIN and as far as I know, this is <a href="http://wiki.alfresco.com/wiki/CMIS#Query_Language">something Alfresco doesn't support via CMIS</a> (at least in 3.3).

Regards
Axel

riteshp1
Champ in-the-making
Champ in-the-making
Thanks for the quick response. I was hoping to find an alfresco specific extension to cmis-sql that could help me in getting the job done. Join works when relating objects to their aspects but my current problem is that not all the aspects are applied to each object so I have to run several queries and then combine the results in java code to get a complete list of documents which match the user's search phrase.