cancel
Showing results for 
Search instead for 
Did you mean: 

CMIS Query Property bounded in Aspect

stockbuyer
Champ in-the-making
Champ in-the-making
Hi all,

I want to find a document that its description is "Testing", so I have created a query as below:
String queryStr = "SELECT * FROM cmis:document WHERE cmis:description LIKE 'Test%'";

It will throw a CmisRunTimeException.

I have already added the Aspect "cm:titled" to this document, any ideas?

Best Regards,
Peter
1 REPLY 1

jpotts
World-Class Innovator
World-Class Innovator
Aspects are not supported by CMIS 1.0. To search for properties defined in an aspect in Alfresco, you must use a join. So to search the description field, the query would look like:
SELECT d.cmis:objectId FROM cmis:document as d join cm:titled as t on d.cmis:objectId = t.cmis:objectId  WHERE t.cm:description like '%Test%'

Jeff