title: Get Foreign Objects instead of QuerySet of List of ID's
body: <p><strong>single line of code to get the Foreign Key objects instead of QuerySet of UUID's.</strong></p>
  <p>I have three Models,</p>
  <pre><code>Student, College, Member
  </code></pre>
  <p>Models are defined similar to below</p>
  <pre><code>class Student(models.Model):
      id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
      name=models.CharField(max_length=128)
  
  class College(models.Model):
      id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
      name=models.CharField(max_length=128)
  
  class Member(models.Model):
      student= models.ForeignKey(Student, related_name=&quot;students&quot;, on_delete=models.CASCADE)
      college= models.ForeignKey(College, related_name=&quot;colleges&quot;, on_delete=models.CASCADE)
  </code></pre>
  <p>Where Member contains of Student and College as Foreign Key fields</p>
  <p>Now I want to get all the Students who belong to a particular College based on college_id which should be filtered from the Member model</p>
  <p>How I am doing now</p>
  <pre><code>student_ids = Member.objects.filter(college_id=college_id).values(&quot;student&quot;)
  </code></pre>
  <p>Now <code>students</code> is a QuerySet of list of UUID's of Student</p>
  <p>As I need actual Student objects instead of QuerySet List of UUID's</p>
  <pre><code>students = Student.objects.filter(id__in=[str(uid) for uid in student_ids])
  </code></pre>
  <p><strong>I feel this is an improper way. Can anyone suggest a single line of code to get the Foreign Key objects instead of QuerySet of UUID's. Thanks in advance</strong></p>