Hi,
Is there a way to write this query without using joins or sub queries using SQL2?
SELECT * FROM [cq:Page]
WHERE ISDESCENDANTNODE(['/content/myapp'])
AND LOCALNAME = 'home'
AND ['jcr:content/domainName'] = 'example.com'
The query in English is "Find all cq:Page nodes that are named home and have a child node jcr:content that has a property domainName with value example.com".
At the moment, the problem is that I cannot use jcr:content/domainName as a property name in the where clause.
Thanks.
Solved! Go to Solution.
You can also refer [1]
http://docs.adobe.com/docs/en/aem/6-0/develop/search/querybuilder-api.html
and test it on query builder (/libs/cq/search/content/querydebug.html)
You can also refer [1]
http://docs.adobe.com/docs/en/aem/6-0/develop/search/querybuilder-api.html
and test it on query builder (/libs/cq/search/content/querydebug.html)
Have you tried @domainName like
SELECT * FROM [cq:Page]
WHERE ISDESCENDANTNODE(['/content/myapp'])
AND LOCALNAME = 'home'
AND ['jcr:content/@domainName'] = 'example.com'
Views
Replies
Total Likes
Views
Likes
Replies