title: How to configure naming strategy in Doctrine 2
body: <p>I read the <a href="http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/namingstrategy.html" rel="noreferrer">chapter</a> about Doctrine naming strategies in the manual. Unfortunately I don't understand where I have to put the configuration code.</p>
  
  <p>In order to get an underscore naming strategy I should use this code:</p>
  
  <pre class="lang-php prettyprint-override"><code>$namingStrategy = new \Doctrine\ORM\Mapping\UnderscoreNamingStrategy(CASE_UPPER);
  $configuration()-&gt;setNamingStrategy($namingStrategy);
  </code></pre>
  
  <p>Where should I put this?</p>
  
  <p>I'm on Symfony 2 — I guess this matters when it comes to configuration.</p>