查询生成器生成错误查询

Here is my QueryBuilder

                        $qb->select('u')
                            ->from(Victim::class,'u')
                            ->join('u.tags','t')
                            ->where('t.id in (11,15)')
                            ->groupBy('u.id')
                            ->having('count(u.id)=2');

It generates incorrect SQL query (look at FROM clause)

    SELECT
      v0_.id           AS id_0,
      v0_.avatarUrl    AS avatarurl_1,
      v0_.displayName  AS displayname_2,
      v0_.summary      AS summary_3,
      v0_.gender       AS gender_4,
      v0_.birthDay     AS birthday_5,
      v0_.maritalState AS maritalstate_6,
      v0_.folder_id    AS folder_id_7
   FROM victims v1_, victims v0_ 
   INNER JOIN victim_tag v3_ ON v0_.id = v3_.victim_id
   INNER JOIN tags t2_ ON t2_.id = v3_.tag_id
   WHERE t2_.id IN (11,15)
   GROUP BY v0_.id
   HAVING count(v0_.id) = 2

But when i use DQL

                        $qry = sprintf(
                            'SELECT u FROM %s u JOIN u.%s t WHERE t.id IN (%s) GROUP BY u.id HAVING count(u.id)= %s ORDER BY u.id DESC',
                            Victim::class,
                            $key,
                            implode(',', $value),
                            count($value)
                        );

Resulting query is ok

SELECT
  v0_.id           AS id_0,
  v0_.avatarUrl    AS avatarurl_1,
  v0_.displayName  AS displayname_2,
  v0_.summary      AS summary_3,
  v0_.gender       AS gender_4,
  v0_.birthDay     AS birthday_5,
  v0_.maritalState AS maritalstate_6,
  v0_.folder_id    AS folder_id_7
FROM victims v0_ INNER JOIN victim_tag v2_ ON v0_.id = v2_.victim_id
  INNER JOIN tags t1_ ON t1_.id = v2_.tag_id
WHERE t1_.id IN (11, 15)
GROUP BY v0_.id
HAVING count(v0_.id) = 2
ORDER BY v0_.id DESC;

I'm a bit confused. I want to use QueryBuilder here because of its flexibility, how to made it work correctly?

Problem reolved.

$qb->add('select', 'u')
    ->add('from', Victim::class . ' u')
    ->join('u.tags','t')
    ->add('where', 't.id in (11,15)')
    ->add('groupBy', 'u.id')
    ->add('having', 'count(u.id)=2');