public function findByUserAndCompetencyIds(User $user, array $competencyIds)
    {
        if (0 === count($competencyIds)) {
            return [];
        }

        return $this->createQueryBuilder('p')
            ->select('p', 'c')
            ->join('p.competency', 'c')
            ->where('p.user = :user')
            ->andWhere((new Expr())->in('p.competency', $competencyIds))
            ->setParameter(':user', $user)
            ->getQuery()
            ->getResult();
    }