cancel
Showing results for 
Search instead for 
Did you mean: 

Query for cmis:secondaryObjectTypeIds

danielgonzález
Champ in-the-making
Champ in-the-making
Hi.

I would like to know if there's any way to query for cmis:secondaryObjectTypeIds from cmis:document.

I know its values can be obtained with a simple SELECT * FROM cmis:document, but I only want this property and I'm trying to maximize performance (though I'm not really sure if it would have any significant improvement, but I would like to try). I know that a simple "SELECT cmis:secondaryObjectTypeIds FROM cmis:document" doesn't work because it's a multi-valued property, so what it's the way to do it? Or the only way it's through a "SELECT *"?
2 REPLIES 2

angelborroy
Community Manager Community Manager
Community Manager
Which CMIS version are you using?

By using CMIS 1.1 this query works:
SELECT cmis:secondaryObjectTypeIds FROM cmis:document


URL services are available at https://wiki.alfresco.com/wiki/CMIS#CMIS_Service_URL
Hyland Developer Evangelist

henryh
Champ in-the-making
Champ in-the-making
Hi,

I have need for the same, and querying secondaryObjectTypeIDs via CMIS 1.1 does not work.

Using Alfresco community 5.0 and cmis endpoint: <URI>/alfresco/api/-default-/public/cmis/versions/1.1/atom with CMIS Workbench Version: 0.14.0 / Revision: 1741103 / Build: 2016-04-26T14:09:01-0700

See attached picture.

My problem is that, I'm doing an client-side interface for the end-users to search documents inside of the site (each site is a single project in our company).

- End-users has a search dialog with the document property fields where they give property values to be searched.
- Client-app. executes a CMIS query to search documents with given values for each property.
- In a results (columned view), app. should show values from ALL property fields of the document BUT, not all documents has the same properties (aspects).

In otherwords, when document with matching values is found via CMIS query. App. should check if document has any other aspects attached, than just the queried ones. If so, then values from those aspects (properties) needs to be queried and shown in a result view. But that cannot be done, because querying the secondarytypes doesn't work.

I'm using plain C++ with raw CMIS calls as specified in OASIS docs. and taking care the "Alfresco" twist on those.

I would be very pleased, if someone could found the solution how to query all document properties (with varying aspects) with CMIS query without querying aspect-by-aspect for each document (secondaryTypes, which in-fact, doesn't even work). I think outer join is needed for that, which is not possible at the moment.