Because the template is assembled using slots in multiple Archetypes, the data that should be conceptually/logically at the same level is actually/structurally at different levels, which makes it challenging to query the data at the same time (OR in a single ADL query/subquery), especially for those users who do not know the tree structure of the target template beforehand.
Hi,
It is not very clear from your post what is challenging/difficult. Perhaps try to explain more on what did with examples, or what you intended to query or find out, how was therefore the AQL query looking, what was your (initial) expectation on writing the query (especially what was challenging), etc.
Hi @sebastian.iancu. Excuse me for my vague (even for myself) expression. Rethinking it carefully, what I wanted to express might be âthat would be nice if the two groups of data points could be queried in a single ADL query using the same pathâ. Actually, maybe itâs not possible to write such an ADL query without specifying their full paths, just like the double slash (//) in an XPath expression âbookstore//bookâ which omits the middle/intermediate paths.
I donât know if I made it clear this time?
Thanks again.
Indeed, the ... CONTAINS bookstore CONTAINS book is a search that in xPath would be equivalent to booskstore//book (so a âdescendantâ relationship), and assuming all what you were looking is a booktype, regardless the relationship level (child, grandchild, etc), then you will get what you are looking for.