| 1 | <?php |
||
| 8 | |||
| 9 | class PerformanceRepository extends AbstractRepository |
||
| 10 | 18 | { |
|
| 11 | public function __construct(ManagerRegistry $registry) |
||
| 12 | 18 | { |
|
| 13 | 18 | parent::__construct($registry, Performance::class); |
|
| 14 | } |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @return array|Performance[] |
||
| 18 | 1 | */ |
|
| 19 | public function findAllWithinSeasons() |
||
| 20 | 1 | { |
|
| 21 | 1 | return $this->createQueryBuilder('p') |
|
| 22 | 1 | ->innerJoin('p.seasons', 'ps') |
|
| 23 | 1 | ->groupBy('p.id') |
|
| 24 | 1 | ->orderBy('p.premiere', 'DESC') |
|
| 25 | 1 | ->getQuery() |
|
| 26 | ->enableResultCache(self::CACHE_TTL) |
||
| 27 | ->execute(); |
||
| 28 | } |
||
| 56 |