mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
add condition on join clause to improve combined Filters/Aggregators
This commit is contained in:
@@ -78,10 +78,10 @@ final class EvaluationAggregator implements AggregatorInterface
|
||||
*/
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$qb
|
||||
->join('acp.works', 'acpw')
|
||||
->join('acpw.accompanyingPeriodWorkEvaluations', 'we')
|
||||
;
|
||||
if (!in_array('acpw', $qb->getAllAliases())) {
|
||||
$qb->join('acp.works', 'acpw');
|
||||
}
|
||||
$qb->join('acpw.accompanyingPeriodWorkEvaluations', 'we');
|
||||
|
||||
$qb->addSelect('IDENTITY(we.evaluation) AS evaluation_aggregator');
|
||||
|
||||
|
@@ -76,7 +76,9 @@ final class SocialActionAggregator implements AggregatorInterface
|
||||
*/
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
{
|
||||
$qb->join('acp.works', 'acpw');
|
||||
if (!in_array('acpw', $qb->getAllAliases())) {
|
||||
$qb->join('acp.works', 'acpw');
|
||||
}
|
||||
|
||||
$qb->addSelect('IDENTITY(acpw.socialAction) AS socialaction_aggregator'); // DISTINCT ??
|
||||
|
||||
|
Reference in New Issue
Block a user