<commit_before><?php

namespace UCP\AbsenceBundle\Repository;

use Doctrine\ORM\EntityRepository;

/**
 * StudentRepository
 *
 * This class was generated by the Doctrine ORM. Add your own custom
 * repository methods below.
 */
class StudentRepository extends EntityRepository
{
}<commit_msg>Find student by lesson absence<commit_after><?php

namespace UCP\AbsenceBundle\Repository;

use Doctrine\ORM\EntityRepository;
use UCP\AbsenceBundle\Entity\Lesson;

/**
 * StudentRepository
 *
 * This class was generated by the Doctrine ORM. Add your own custom
 * repository methods below.
 */
class StudentRepository extends EntityRepository
{
	public function findAbsentByLesson(Lesson $lesson)
	{
		$query = $this->_em->createQuery('SELECT s FROM UCPAbsenceBundle:Student s JOIN s.absences a WHERE a.lesson = ?1')
			->setParameter(1, $lesson);

		return $query->getResult();
	}
}
{'fraction_non_alphanumeric': 0.09806157354618016, 'fraction_numerical': 0.002280501710376283, 'mean_word_length': 4.9727891156462585, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5213161', 'n_tokens_mistral': 262, 'n_tokens_neox': 256, 'n_words': 76}