public function findArchivedEventsQuery(Production $production)
    {
        $qb = $this->createQueryBuilder('e');

        return $qb
            // Add joins.
            ->join('e.groups', 'g')

            // Add conditions.
            ->andWhere($qb->expr()->eq('g', ':production'))
            ->andWhere($qb->expr()->eq('e.active', ':active'))
            ->andWhere($qb->expr()->isNull('e.schedule'))

            // Add parameters.
            ->setParameter('production', $production)
            ->setParameter('active', false)

            // Add ordering.
            ->addOrderBy('e.updated', 'DESC')

            // Get query.
            ->getQuery();
    }