title: Using array parameter in DQL
body: <p>I am basically trying to execute dql as below:</p>
  
  <pre><code>$queryString = "SELECT ac FROM CloudExchange\Entities\Account ac JOIN ac.account_connections cn WHERE cn.account IN (:accounts)";
  $query = $em-&gt;createQuery($queryString);
  $query-&gt;setParameter('accounts', $service-&gt;getAccounts());
  $results = $query-&gt;getResult();
  </code></pre>
  
  <p>I am using doctrine 2.3.x version. Seems like the above approach doesn't work. It returns following error:</p>
  
  <pre><code>PHP Catchable fatal error:  Object of class Doctrine\ORM\PersistentCollection could not be converted to string in......
  </code></pre>
  
  <p>Can anyone have any idea what is possibly wrong with my approach or what alternative better way to achieve "WHERE IN" condition based DQL please? Thanks.</p>