Documentation
Search in DEPENDENCIES
Searching the elements which have a dependency to a specific element, whatever the dependency type is :
<SEARCH>
<MEDIA>
<DEPENDENCIES>
<MEDIA ID="25"/>
</DEPENDENCIES>
</MEDIA>
</SEARCH>
Nb: a dependency is not symetric (unless configured so) : it's directed from the parent to the child. Thus this query will give you the parents of the Media with ID = 25.
If you want to know the different types of dependencies, read more about it here.
If you want the children of the Media with ID=25, you will write it this way :
<SEARCH>
<MEDIA>
<DEPENDENCIES mode="reverse">
<MEDIA ID="25"/>
</DEPENDENCIES>
</MEDIA>
</SEARCH>
Searching the elements which have a dependency to a Media which Mediatype is "Menu" :
<SEARCH>
<MEDIA>
<DEPENDENCIES>
<MEDIA>
<INFO>
<MEDIATYPE>Menu</MEDIATYPE>
</INFO>
</MEDIA>
</DEPENDENCIES>
</MEDIA>
</SEARCH>
You can also write it :
<SEARCH>
<MEDIA>
<DEPENDENCIES>
<MEDIA mediatype="Menu"/>
</DEPENDENCIES>
</MEDIA>
</SEARCH>
Searching for imbricated dependencies
We want the grandfather of an element, without knowing which type of dependency is used.
<SEARCH>
<MEDIA>
<DEPENDENCIES>
<MEDIA>
<DEPENDENCIES>
<MEDIA ID="25"/>
</DEPENDENCIES>
</MEDIA>
</DEPENDENCIES>
</MEDIA>
</SEARCH>
Searching for dependency with additional information
Additional informations can be saved on a dependency to characterize it (Rate, Status, etc). See the NQL UPDATE command.
<SEARCH>
<MEDIA mediatype="Menu">
<DEPENDENCIES>
<MEDIA>
<DEPINFO operator="=">3</DEPINFO>
<COMMENT operator="=">pending</COMMENT>
</MEDIA>
</DEPENDENCIES>
</MEDIA>
</SEARCH>