title: Doctrine DQL IN clause with simple_array
body: <p>I need to check cpv.text (simple_array type Doctrine2 (1,2,5,6)) for pr.id contained in it. Is there any other way to do this? My query isn't working, cuz I'm using IN clause wrong. 
  Sorry for my English.    </p>
  
  <pre><code>return  $this-&gt;getEntityManager()
  -&gt;createQuery(("SELECT c, cpv, pr, p "
  . "FROM AmoMainBundle:Company c "
  . "JOIN c.status s "
  . "JOIN cpv.param p "
  . "JOIN c.country co "
  . "JOIN p.props pr "
  . "WHERE  EXISTS (SELECT p2 FROM AmoMainBundle:Param p2 "
  . "LEFT JOIN p2.props pr2 "
  . "LEFT JOIN p2.companyParameterValues cpv2 "
  . "WHERE (p2.type &gt;=2 AND pr2.text LIKE ?1 "
  . "AND pr2.id IN (cpv2.text) AND p2.name LIKE ?2) "
  . "OR (p2.type &lt; 2 AND p2.name LIKE ?2)) "
  . "AND (s IS NULL OR s.dateto &lt; CURRENT_TIMESTAMP()) "
  . "ORDER BY c.lastupd DESC, "
  . "c.name ASC, p.mainPriority DESC" )
                      -&gt;setParameter(1,$text)-&gt;setParameter(2, $name);
  </code></pre>