title: How do access different tables in the database without creating entities in Symfony
body: <p>I have a table with 3 columns EmployeeNum, JobTitleCode and cost. I have made an entity for it with basic CRUD functions. </p>
  
  <p>EmployeeNum and JobTitleCode are both Foreign Keys and when displaying the entity I want to be able to query another table in the database to extract EmployeeName from EmployeeNum and JobTitle from JobTitleCode. </p>
  
  <p>In Symfony 1.4 I could just do Doctrine_Core::getTable('Employees').find('EmployeeNum') by defining 'Employees' in the schema but I couldn't find any similar method in Symfony 2.4. </p>
  
  <p>From the <a href="http://api.symfony.com/2.0/Symfony/Bundle/DoctrineBundle/Registry.html" rel="nofollow">API</a> for getDoctrine() I didn't find any similar methods I could use and if I build a query as such:</p>
  
  <p><code>createQuery('SELECT a FROM hs_hr_employee a WHERE a.emp_number=1')</code> </p>
  
  <p>I get the error below</p>
  
  <pre><code>[Semantical Error] line 0, col 14 near 'hs_hr_employee': Error: Class 'hs_hr_employee' is not defined
  </code></pre>
  
  <p>So how do  you go about accessing data from other tables in the db? </p>