title: MySql Doctrine: find if given variable is IN array property
body: <p>I have class Task with <code>categories</code> array of integers property</p>
  
  <pre><code>class Task{
        /**
         * @var array
         *
         * @ORM\Column(name="categories", type="array", nullable=true)
         */
  private $categories;
   }
  </code></pre>
  
  <p>now in controller I am trying to build query which would check if <code>category id</code> variable is in <code>categories</code> array of the task</p>
  
  <pre><code>  $qb = $this-&gt;getDoctrine()-&gt;getRepository('CoreBundle:Task')-&gt;createQueryBuilder('t');
    $qb-&gt;where(':category IN (t.categories)')
                      -&gt;setParameter('category', $category);
  </code></pre>
  
  <p>This gives me error:</p>
  
  <pre><code> [Syntax Error] line 0, col 140: Error: Expected Literal, got "t";
  </code></pre>