Like predicate in CMIS query

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

Like predicate in CMIS query

Does alfresco support like predicate in CMIS query.

I have a query something like select * from cmis:document where cmisSmiley SurprisedbjectTypeId like '%sometext%'.

This query throws cmisruntimeexception in the code and throws an error in the cmis workbench.

Attached error below.

4 Replies
cesarista
Customer

Re: Like predicate in CMIS query

Hi:

Predicates and LIKES are possible in CMIS-SQL, but cmisSmiley SurprisedbjectTypeId is in fact your content type, usually cmis:document or a custom type.

Regards.

--C.

udayakumar_p
Active Member

Re: Like predicate in CMIS query

Hi,

Thanks for the reply. I didnt get what you have said. I was saying LIKE predicate does not work for cmisSmiley SurprisedbjectTypeId as in the below query.

select * from cmis:document where cmisSmiley SurprisedbjectTypeId like '%sometext%'

cesarista
Customer

Re: Like predicate in CMIS query

Sure, for me it's the same behaviour with this CMIS query.

I only wanted to note that you can select from your document types ("cmisSmiley SurprisedbjectTypeId") in the from part

SELECT * FROM my:cars

http://alfrescoblog.com/2014/07/12/alfresco-cmis-tutorial/ 

Query Examples - Apache Chemistry Samples 

Regards.

--C.

deepak_talape
Active Member

Re: Like predicate in CMIS query

select * from cmis:document where cmis:name LIKE '%sometext'

Try this way. It worked for me.