mirror of
https://github.com/shlinkio/shlink.git
synced 2026-02-28 04:03:12 +08:00
Used DQL for non-dynamic query in VisitRepository
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user