Extending CMIS query to get all documents with a property

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Active Member II

Extending CMIS query to get all documents with a property

1I have an aspect that I have associated with multiple documents. For example lests call the aspect OrderAspect. 

The below query works when I fetch all nodes that have a location property from OrderAspect set to 'WAREHOUSE-A'

SELECT * FROM oaSmiley SurprisedrderAspect WHERE oa:Location ='WAREHOUSE-A'  

1. How can I extend this query to get all documents that have this aspect and the location value as 'WAREHOUSE-A'

2. Can I extend this query to search within a folder path or sit? I would like to list all the documents within a folder (including subfolder) or a site that has OrderAspect with property location set to 'WAREHOUSE-A'.

2 Replies
Highlighted
Active Member II

Re: Extending CMIS query to get all documents with a property

Hi - Is there a way to do this? Would any expert be able to opine?

Highlighted
Active Member II

Re: Extending CMIS query to get all documents with a property

try like this you will get all the documents associated with aspect orderAspect of location 'warehouse'

SELECT * FROM cmis:document AS d JOIN oaSmiley SurprisedrderAspect as p ON d.cmisSmiley SurprisedbjectId = p.cmisSmiley SurprisedbjectId WHERE oa:Location ='WAREHOUSE-A'