Is there a way to query if array field contains a certain value in Doctrine2?
- by dpimka
Starting out with Symfony2 + Doctrine.
I have a table with User objects (fos_user), for which my schema contains a roles column of an 'array' type.
Doctrine saves fields of this type by serializing them from php 'array' to 'longtext' (in mysql's case).
So let's say I have the following users saved into DB:
**User1**: array(ROLE_ADMIN,…