title: Doctrine selected joined objects
body: <p>I have two two related entery (class):
  First class (Todo class):</p>
  
  <pre><code>class Todo
  {
      /**
       * @var int
       *
       * @ORM\Column(name="id", type="integer")
       * @ORM\Id
       * @ORM\GeneratedValue(strategy="AUTO")
       */
      private $id;
  }
  </code></pre>
  
  <p>And Comment class(part):</p>
  
  <pre><code>class Comment
  {
      /**
       * @var int
       *
       * @ORM\Column(name="id", type="integer")
       * @ORM\Id
       * @ORM\GeneratedValue(strategy="AUTO")
       */
      private $id;
  
      /**
       * ID человека
       * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Todo")
       * @ORM\JoinColumns({
       *   @ORM\JoinColumn(name="postid", referencedColumnName="id")
       * })
       */
      private $postId;
  }
  </code></pre>
  
  <p>How I can select comment's by Todo id?</p>
  
  <p>In Controller I try :</p>
  
  <pre><code>$todos=$this-&gt;getDoctrine()
      -&gt;getRepository('AppBundle:Todo')
      -&gt;find($id);
  //   var_dump($todos);
  $em=$this-&gt;getDoctrine()-&gt;getManager();
  $comments=$em-&gt;createQueryBuilder()
      -&gt;select('c')
      -&gt;from('Comment','c')
      -&gt;leftJoin('')
      -&gt;where('postid',':postID')
      -&gt;orderBy('postid', 'ASC')
       -&gt;setParameter('postID', $id)
       -&gt;getQuery()
       -&gt;getResult();
  </code></pre>
  
  <p>How to choose Comment on the connection with Todo?</p>