I have a set of documents where some of them have a child (associtaion type "ecmccontent:content_origin") and some of them don't have such child association. I need a result set of documents without such association, how to do that (in any query language)? Thank you!
Hi,
To my mind your case is caused by a conception/modelization problem. You have to find documents which don't have a particular property instead searching documents having a particular property.
In other words, "searching documents you want" will be more simple than "searching ones you don't want and next search for the others".
Maybe what I say is wrong but I think that whatever your algorithm, you will have to loop into your results to check if your documents have this association or not.
In order to code that, I think Java API will be more helpful than Javascript because Java API offers more functions : http://dev.alfresco.com/resource/AlfrescoOne/5.2/PublicAPI/overview-summary.html
I'm not an expert in development but maybe DictionaryService class could help you :
http://dev.alfresco.com/resource/AlfrescoOne/5.2/PublicAPI/org/alfresco/service/cmr/dictionary/Dicti...
Hope it helps.
The subject was to select a document with the specific association via single query and there is no method to do it in the single query.
I'm afraid three is no such query .
you can try to add a custom property to your document and use this custom property to save the number of associations .
When you update the association ,you also update this property.
For documents withou association ,the property value is 0 or null.
As for existing data ,you need to write code to update it one bye one.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.