title: Doctrine: Fetch entities by property in array
body: <p>I have an entity Image which has the property "categories". Categories is an instance of Doctrine's ArrayCollection and holds different Category objects.</p>
  
  <p>I now want to fetch all Image objects containing the Category object "main".</p>
  
  <p>With normal properties this looks like this:</p>
  
  <pre><code>$repository-&gt;findBy(array('category' =&gt; 'main'));
  </code></pre>
  
  <p>Is this also possible with Array properties or do I have to fetch the Images over the Category side?</p>
  
  <p>Regards!</p>