title: Symfony2 SQLSTATE[42S22]: Column not found: 1054 Unknown column
body: <p>I'm trying to create a todo list kind of app. At the moment I am just trying to output all the tasks based on the user instanced user id. I'm having some trouble writing the query using <code>$user-&gt;getId()</code> as the parameter for user_id.</p>
  
  <p>Here's what I have:</p>
  
  <pre><code>public function indexAction()
      {
          $user = $this-&gt;getUser();
          //var_dump($user);
  
          $em = $this-&gt;getDoctrine()-&gt;getManager();
          $query = $em-&gt;createQuery(
              'SELECT p
              FROM TaskBundle:Task p
              WHERE p.user_id = :user_id'
          )-&gt;setParameter('user_id', $user-&gt;getId());
  
          $tasks = $query-&gt;getResult();
  
          return $this-&gt;render('Default/index.html.twig', array(
                  'tasks' =&gt; $tasks,
          ));
      }
  </code></pre>
  
  <p>I've tried QueryBuilder and DQL and I am getting the same error.</p>
  
  <pre><code>An exception occurred while executing 'SELECT t0_.id AS id0, t0_.name AS name1, t0_.done AS done2, t0_.created AS created3, t0_.updated AS updated4, t0_.user_id_id AS user_id_id5 FROM tasks t0_ WHERE t0_.user_id_id = ?' with params [1]:
  
  SQLSTATE[42S22]: Column not found: 1054 Unknown column 't0_.user_id_id' in 'field list'
  </code></pre>