Get By File Name

This commit is contained in:
Michael RICOIS 2016-07-25 17:42:45 +02:00
parent ddc583d1ca
commit 7c459d76dc

View File

@ -5,4 +5,13 @@ use Doctrine\ORM\EntityRepository;
class FluxFileinRepository extends EntityRepository
{
public function getByFilename($name)
{
$dql = "SELECT f FROM Application\Entity\FluxFilein f WHERE ".
"f.depotfile=:name";
$query = $this->getEntityManager()->createQuery($dql)
->setParameter('name', $name);
return $query->getOneOrNullResult();
}
}