Skip to content

Commit

Permalink
fetch default and all services for network
Browse files Browse the repository at this point in the history
  • Loading branch information
Francisco Albert authored Sep 19, 2017
1 parent 11b95fc commit 0e99754
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Data/ProgrammesDb/EntityRepository/ServiceRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ public function findByIdsWithNetworkServicesList(array $ids): array
public function findByPidFull(string $pid): ?array
{
$qb = $this->createQueryBuilder('service')
->addSelect('network')
->addSelect('network', 'networkServices', 'defaultService')
->andWhere('service.pid = :pid')
->join('service.network', 'network')
->join('network.services', 'networkServices')
->join('network.defaultService', 'defaultService')
->setParameter('pid', $pid);

return $qb->getQuery()->getOneOrNullResult(Query::HYDRATE_ARRAY);
Expand Down

0 comments on commit 0e99754

Please sign in to comment.