07-18-2020 12:23 PM
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!
07-24-2020 09:50 AM
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.
09-02-2020 11:02 AM
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.
09-03-2020 12:06 AM
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.
Explore our Alfresco products with the links below. Use labels to filter content by product module.