I was trying to a run raw sql query with doctrine entitymanager for IN clause as shown below.
$idSArray = Array ( [0] => 1 [1] => 2 ) $stm
You have to let your array as an array, don't implode it.
$params = array( 'ids' => $idSArray );