As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
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/DictionaryService.html
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.