title: How to filter entities subresources with the Api Platform filters
body: <p>In our API we need to show only filtered data. Example:</p>
  
  <p>Deal entity has a one-to-many relation with Manager entity (so $managers is a subresource for the Deal). I need to filter all deal items with a special value of for example surname of the Manager. I've made a SearchFilter on the manager's surname Deal. </p>
  
  <pre><code>@ApiFilter(SearchFilter::class, properties={"managers.surname": "exact"})
  </code></pre>
  
  <p>It works as expected, but the result collection of deals contains unfiltered managers.</p>
  
  <p>As I investigated, a query for filtering deals contains needed condition, but only in the subquery. </p>
  
  <pre><code>#Doctrine query dump goes here
  SELECT ... FROM deal 
  # bunch of JOINS here
  WHERE deal.id IN (
  SELECT d.id FROM deal d
  JOIN manager m ... 
  # bunch of JOINS here
  WHERE m.surname = :surname
  )
  # but we need "WHERE m.surname = :surname" condition on the level up also
  </code></pre>
  
  <p>How can I copy it to the upper level? Maybe there is a proper way to deal with my issue? I've found a same problem Github <a href="https://github.com/api-platform/api-platform/issues/424" rel="noreferrer">issue</a> but without any solution there.</p>