Add Clean Duplicates Command

This commit is contained in:
Thomas Citharel
2017-02-24 11:27:03 +01:00
parent 3cbb0cc3ef
commit e2f3800ccb
2 changed files with 132 additions and 0 deletions

View File

@ -379,4 +379,17 @@ class EntryRepository extends EntityRepository
->setParameter('userId', $userId)
->execute();
}
/**
* Get id and url from all entries
* Used for the clean-duplicates command.
*/
public function getAllEntriesIdAndUrl($userId)
{
$qb = $this->createQueryBuilder('e')
->select('e.id, e.url')
->where('e.user = :userid')->setParameter(':userid', $userId);
return $qb->getQuery()->getArrayResult();
}
}