Expand my Community achievements bar.

Forming joins with AEM queries using QueryBuilder API

Avatar

Level 4

Is it possible to create joins on different node sets when querying AEM using the QueryBuilder API ?

2 Replies

Avatar

Community Advisor

Hi @Seek_AEM, I do not think Query Builder API is supporting JOINs explicitly. At least there is nothing about it in the official Adobe documentation:

As a solution you could use SQL2 - this supports JOINs, here are some examples: https://drfits.com/jcr-sql2-query-with-examples/

You can also try extend Query Builder API developing your own PredicateEvaluator - to meet your requirements using Query Builder.

Avatar

Level 4

Thank you @lukasz-m . I wanted to try SQL2 queries however these query results are not pagination friendly when compared to Query Builder. I will try and implement custom predicates for joins