Filter rows on related table using Doctrine
<p>I'm very new to Doctrine/Symfony and I'm pulling my hair because I can't get how to do this.</p>

<p>I have two tables related by one foreign key.</p>

<pre><code>Product: id, name, stock
Order: id, date, productId, quantity, sent
</code></pre>

<p>I can get all the orders of one product with <code>$produt-&gt;getOrders()</code> but I'd like to get <strong>Only</strong> those which are pending to sent.</p>

<p>How should I do it?.</p>

<p>Thanks.</p>