title: Symfony2 SymBlog tutorial : [Semantical Error] line 0, col 15 near 'c.post = :post_id': Error: Class 'c' is not defined.
body: <p>I was following the Symfony2 blog <a href="http://tutorial.symblog.co.uk/docs/extending-the-model-blog-comments.html#data-fixtures-revisited" rel="nofollow">tutorial part 4</a> 
  and I encountered this error when I tried to query the post's comments:</p>
  
  <pre><code>public function postAction($id) {
      $em = $this-&gt;getDoctrine()-&gt;getEntityManager();
  
      $post = $em-&gt;getRepository('BlogBundle:Post')-&gt;find($id);
  
      if (!$post) {
          throw $this-&gt;createNotFoundException('Unable to find Blog post.');
      }
  
      $comments = $em-&gt;createQueryBuilder('c')
              -&gt;select('c')
              -&gt;where('c.post = :post_id')
              -&gt;addOrderBy('c.created')
              -&gt;setParameter('postId', $id)
              -&gt;getQuery()
              -&gt;getResult();
  
      return $this-&gt;render('BlogBundle:Default:post.html.twig', array(
                  'post' =&gt; $post,
                  'comments' =&gt; $comments
      ));
  }
  </code></pre>
  
  <p>I get the following error:</p>
  
  <blockquote>
    <p>"[Semantical Error] line 0, col 15 near 'c.post = :post_id': Error:
    Class 'c' is not defined."</p>
  </blockquote>