<?php

namespace Offy\Bundle\DashboardBundle\Repository;

use Doctrine\ODM\MongoDB\DocumentRepository;

/**
 * JobRepository
 *
 * This class was generated by the Doctrine ORM. Add your own custom
 * repository methods below.
 */
class JobRepository extends DocumentRepository
{
    public function findAllJobOpen()
    {
        return $this->createQueryBuilder()
                    ->field('number_open')->gt(0)
                    ->sort('name', 'ASC')
                    ->getQuery()
                    ->execute();
    } 
}