title: Symfony getting all field names from database table
body: <p>I need to get all database table field names. I've already tried getting that using <code>ClassMetadata</code> unfortunately <code>getColumnNames()</code> doesn't return relational field names. and method <code>getAssociationNames()</code> returns names of entity properties which are not the same names and also might include fields that doesn't really exist in database when using <code>oneToMany</code> relations.</p>
  
  <p>As people mentioned that this may be duplicate. It's not. <a href="https://stackoverflow.com/questions/10825812/getting-column-names-in-a-doctrine2-entity">Getting column names in a doctrine2 entity</a> which might be a similar problem but <code>getFieldNames</code> method  doesn't return field names which has relations to other entities.</p>
  
  <p>So how do I get All column names from database table?</p>