foreach ($aggregation->
getFields() as $fieldName) { $this->queryHelper->
resolveAccessor($fieldName,
$definition,
$table,
$query,
$context,
$aggregation);
} $query->
resetQueryPart('groupBy'
);
$this->
extendQuery($aggregation,
$query,
$definition,
$context);
$rows =
$query->
executeQuery()->
fetchAllAssociative();
return $this->
hydrateResult($aggregation,
$definition,
$rows,
$context);
} private function findToManyPath(Aggregation
$aggregation, EntityDefinition
$definition): ?string
{ $fields = EntityDefinitionQueryHelper::
getFieldsOfAccessor($definition,
$aggregation->
getField(), false
);
if (\
count($fields) === 0
) { return null;
} // contains later the path to the first to many association