mirror of
https://github.com/shlinkio/shlink.git
synced 2024-10-23 04:35:34 +03:00
Used DQL for non-dynamic query in VisitRepository
This commit is contained in:
parent
f8207994dc
commit
58dbee10c5
1 changed files with 3 additions and 3 deletions
|
@ -12,10 +12,10 @@ class VisitRepository extends EntityRepository implements VisitRepositoryInterfa
|
||||||
{
|
{
|
||||||
public function findUnlocatedVisits(): iterable
|
public function findUnlocatedVisits(): iterable
|
||||||
{
|
{
|
||||||
$qb = $this->createQueryBuilder('v');
|
$dql = 'SELECT v FROM Shlinkio\Shlink\Core\Entity\Visit AS v WHERE v.visitLocation IS NULL';
|
||||||
$qb->where($qb->expr()->isNull('v.visitLocation'));
|
$query = $this->getEntityManager()->createQuery($dql);
|
||||||
|
|
||||||
return $qb->getQuery()->iterate();
|
return $query->iterate();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue