Open neos-bot opened 9 years ago
Comment created by baumgartl:
Another way is to guess the join aliases and add them to the select manually:
/*** @var Query $query **/
$queryBuilder = $query->getQueryBuilder();
$queryBuilder->addSelect('seasons0', 'episodes1');
Comment created by baumgartl:
I think it would be generally worthy if we had the possibility to add associations (join tables) to a query without to know the table aliases.
Comment created by lubitz:
+1 from me. Doctrine already supports that, so why not the flow query interface?
Jira issue originally created by user baumgartl:
If you have a hierarchy like this:
And want to filter the shows by a property of the episodes you can do this with (Repository find method):
But if you want to get the seasons with
$show->getSeaons()
for this filtered list, you get ALL linked seasons. The same applies for episodes.With the attached path, you can add all joined tables to the query select. The result will be mapped to the objects and the get seasons and get episodes method only returns the filtered entities.
Atachements:
Jira-URL: https://jira.neos.io/browse/FLOW-232