I have this native SQL written in doctrine
SELECT COUNT(DISTINCT t.int_task_type_id) as a_count
FROM tbl_xref_people_task t
WHERE t.bit_completed = true AND
t.int_people_id = :peopleId AND
t.int_task_type_id IN (:taskType)
I have to write it in native SQL because int_task_type_id is the discriminator column in a hierarchical model class.
The problem is that i cannot do the following:
$query->setParameter(':taskType', implode(', ',$taskType));
or this:
$query->setParameter(':taskType', $taskType, 'array');
How can I solve this?