forked from wallabag/wallabag
Allow to remove all archived entries
Since we still support fucking SQLite, we need to retrieve all tags & annotations for archived entries before deleting them. Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
committed by
Nicolas Lœuillet
parent
fa884b30ba
commit
6da1aebc94
@ -122,4 +122,20 @@ class AnnotationRepository extends EntityRepository
|
||||
->setParameter('userId', $userId)
|
||||
->execute();
|
||||
}
|
||||
|
||||
/**
|
||||
* Find all annotations related to archived entries
|
||||
*
|
||||
* @param $userId
|
||||
* @return mixed
|
||||
*/
|
||||
public function findAllByArchivedEntriesAndUserId($userId)
|
||||
{
|
||||
return $this->createQueryBuilder('a')
|
||||
->leftJoin('a.entry', 'e')
|
||||
->where('a.user = :userid')->setParameter(':userid', $userId)
|
||||
->andWhere('e.isArchived = true')
|
||||
->getQuery()
|
||||
->getResult();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user