src/Kunstmaan/AdminBundle/Repository/AclChangesetRepository.php
public function findRunningChangeset()
    {
        $qb = $this->createQueryBuilder('ac')
            ->select('ac')
            ->where('ac.status = :status')
            ->addOrderBy('ac.id', 'ASC')
            ->setMaxResults(1)
            ->setParameter('status', AclChangeset::STATUS_RUNNING);

        return $qb->getQuery()->getOneOrNullResult();
    }
public function findRunningChangeset()
    {
        $qb = $this->createQueryBuilder('ac')
            ->select('ac')
            ->where('ac.status = :status')
            ->addOrderBy('ac.id', 'ASC')
            ->setMaxResults(1)
            ->setParameter('status', AclChangeset::STATUS_RUNNING);

        return $qb->getQuery()->getOneOrNullResult();
    }
public function findRunningChangeset ( ) { $ qb = $ this -> createQueryBuilder ( 'ac' ) -> select ( 'ac' ) -> where ( 'ac.status = :status' ) -> addOrderBy ( 'ac.id' , 'ASC' ) -> setMaxResults ( 1 ) -> setParameter ( 'status' , AclChangeset :: STATUS_RUNNING ) ; return $ qb -> getQuery ( ) -> getOneOrNullResult ( ) ; }
Find a changeset with status RUNNING

@return null|AclChangeset
Find a changeset with status RUNNING