How to use QueryBuilder and Doctrine Array type?
<p>I have a user table with a property named roles, which is in Doctrine array type. This is how it looks like in the database :
<a href="http://i.stack.imgur.com/JgqOl.png" rel="nofollow">roles in user table</a></p>

<p>I am creating a query using Doctrine class QueryBuilder.<br>
Right now, my query looks like this :  </p>

<pre><code>    $queryBuilder-&gt;select(array("u.id", "u.roles"))
        -&gt;from("CNDUserBundle:User", "u")
        -&gt;setMaxResults(10)
    ;
</code></pre>

<p>I need to get a list of all the users with a specific role, but I don't know how to check the value inside the Doctrine array type.  </p>