I am trying to prepare a dynamic flexible query to fetch a category including its all sub/nested categories. Hybris keeps category relation in CategoryCategoryRelation and if I join the table itself it doesn't give a category if it doesn't have any subcategory.
Thanks