for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace AppBundle\Entity;
use Doctrine\ORM\EntityRepository;
class MealRepository extends EntityRepository
{
public function findOrderedByPosition()
return $this
->createQueryBuilder('m')
->orderBy('m.position', 'ASC')
->getQuery()
->getResult()
;
}
public function countAll()
->select('COUNT(m.id)')
->getSingleScalarResult()