How to get all objects of a Parent model of which foreign key exist in child model in Django?
<p>I have 2 models</p>

<pre><code>#models
class Parent(models.Model):
     name = models.CharField()

class Child(models.Model)
     parentLink = models.ForeignKey(Parent)
     timeStamp = models.DateTimeField(auto_now_add=True)
</code></pre>

<p>I want all the objects of Parent model having foreign key mentioned in Child model and some filter on timeStamp field.</p>

<p>How do I do this reverse fetching of objects?</p>

<p>It's MySQL would be something like this</p>

<pre><code>SELECT Parent.name FROM Parent JOIN Child on Parent.Id = Child.parentLink WHERE Child.timeStamp &gt; '2016-01-01 : 00.00.00'
</code></pre>