mirror of
https://github.com/shlinkio/shlink.git
synced 2024-12-25 08:21:11 -06:00
Used DQL for non-dynamic query in VisitRepository
This commit is contained in:
parent
f8207994dc
commit
58dbee10c5
@ -12,10 +12,10 @@ class VisitRepository extends EntityRepository implements VisitRepositoryInterfa
|
||||
{
|
||||
public function findUnlocatedVisits(): iterable
|
||||
{
|
||||
$qb = $this->createQueryBuilder('v');
|
||||
$qb->where($qb->expr()->isNull('v.visitLocation'));
|
||||
$dql = 'SELECT v FROM Shlinkio\Shlink\Core\Entity\Visit AS v WHERE v.visitLocation IS NULL';
|
||||
$query = $this->getEntityManager()->createQuery($dql);
|
||||
|
||||
return $qb->getQuery()->iterate();
|
||||
return $query->iterate();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user