public function deleteOldRegistrations()
    {
        $qb = $this->repository->createQueryBuilder('d');
        $qb->delete('Phraseanet:Registration', 'd');
        $qb->where($qb->expr()->lt('d.created', ':date'));
        $qb->setParameter(':date', new \DateTime('-1 month'));
        $qb->getQuery()->execute();
    }