0
votes

After adding some custom properties to a content model I can not SELECT any of the newly added properties using a CMIS query.

After stopping Alfresco server and SOLR using the following command:

sudo /etc/init.d/tomcat6 stop \

I deleted the following folders:

alf_data/solr/workspace/SpacesStore/
alf_data/solr/archive/SpacesStore/

And deleted the contents of the following directories:

alf_data/solr/archive-SpacesStore/alfrescoModels
alf_data/solr/workspace-SpacesStore/alfrescoModels 

and redployed my alfresco server.

My object Type ID is ai:bulletin and the property is ai:year

After the indeces were recreated I can successfully execute:

SELECT * FROM ai:bulletin

which returns ai:year as part of the returned data

but when trying the following query:

SELECT ai:year FROM ai:bulletin

I receive an exception and nothing is returned.

Any ideas of what I might be doing wrong?

1
which Alfresco version & which CMIS version (CMIS endpoint) do you use? - alfrescian
Cross-posted in the Alfresco forums: forums.alfresco.com/forum/developer-discussions/… - Jeff Potts

1 Answers

0
votes

First of all, why you would delete solr indexes? Anyway, for CMIS, in order for the custom properties to be viewed in the resultset, you need to join the aspects which contain your custom properties, and then list the custom properties you'd like to get. Otherwise you'll get the exception. Here is a query I used time ago, it's just for demonstration purposes. Hope it helps.

SELECT z.cmis:objectId, z.cmis:objectTypeId, z.cmis:name , db.fo:num_ord_barcode , db.fo:anno_cont_ord , di.fo:cod_ufficio , db.fo:cod_agente , db.fo:partita_iva , db.fo:provincia , db.fo:check_ord_barcode , db.fo:data_ord , db.fo:cod_gruppo , db.fo:cod_zona , db.fo:cod_distretto , db.fo:mese_cont_ord , db.fo:nominativo , db.fo:localita , db.fo:cod_fisc , di.fo:num_distinta , di.fo:data_distinta , cc.fo:cod_cliente , fa.fo:num_fatt , fa.fo:data_fatt , tf.fo:tipologia_fattura FROM fo:fattura_folletto z JOIN fo:fattura_folletto tf ON z.cmis:objectId = tf.cmis:objectId JOIN fo:aspetto_fattura fa ON z.cmis:objectId = fa.cmis:objectId JOIN fo:aspetto_doc_base db ON z.cmis:objectId = db.cmis:objectId JOIN fo:aspetto_distinta di ON z.cmis:objectId = di.cmis:objectId JOIN fo:aspetto_cod_cliente cc ON z.cmis:objectId = cc.cmis:objectId WHERE db.fo:nominativo like '%YOUR SEARCH STRING%'