for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace AppBundle\Repository;
use AppBundle\Entity\Survey\Survey;
/**
* SurveyAnswerRepository.
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class SurveyAnswerRepository extends \Doctrine\ORM\EntityRepository
{
public function findAnswersBySurvey(Survey $survey)
$query = $this->createQueryBuilder('a')
->where('a.survey = :survey')
->setParameter('survey', $survey)
->getQuery();
return $query->getResult();
}