Add untagged entries

Fix #1631
This commit is contained in:
Nicolas Lœuillet
2016-08-26 16:55:41 +02:00
committed by Jeremy Benoist
parent 8635ab1cd1
commit b6520f0b15
17 changed files with 57 additions and 1 deletions

View File

@ -84,6 +84,22 @@ class EntryRepository extends EntityRepository
;
}
/**
* Retrieves untagged entries for a user.
*
* @param int $userId
*
* @return QueryBuilder
*/
public function getBuilderForUntaggedByUser($userId)
{
return $this
->getBuilderByUser($userId)
->leftJoin('e.tags', 't')
->groupBy('e.id')
->having('count(t.id) = 0');
}
/**
* Find Entries.
*