title: How to build a Docterine Inner Join Query in Symfony
body: <p>Im working on a Symfony project and I want to create Doctrine Query for this SQL.</p>
  
  <p>USER table :
  columns -
    NICK_NAME</p>
  
  <p>REVIEWS table:
  columns -
    USER_ID
  ,  REVIEW,
    CREATED_AT </p>
  
  <p>Thank you</p>
  
  <pre><code>SELECT
  `USER`.NICK_NAME,
  REVIEWS.REVIEW,
  REVIEWS.CREATED_AT
  FROM
  REVIEWS
  INNER JOIN `USER` ON REVIEWS.USER_ID = `USER`.ID
  WHERE
  REVIEWS.MOVIE_ID = 625
  GROUP BY
  REVIEWS.USER_ID
  </code></pre>
  
  <p>I tried something like this</p>
  
  <pre><code>    $q = Doctrine_Query::create()
              -&gt;select("u.NICK_NAME,r.REVIEW,r.CREATED_AT")
              -&gt;from('REVIEWS r')
              -&gt;innerJoin('`USER` ON REVIEWS.USER_ID = `USER`.ID')
              -&gt;where('REVIEWS.MOVIE_ID = 625')
              -&gt;groupBy('REVIEWS.USER_ID');
  </code></pre>
  
  <p>and got this:</p>
  
  <pre><code>500 | Internal Server Error | Doctrine_Exception Couldn't find class `USER`
  </code></pre>