title: Overwriting entities from another bundle in Symfony2
body: <p>We're writing a custom CMS based on Symfony2 and are currently working on the user system. Our bundle has defined a <code>BaseSiteUser</code> that contains all the most common properties that a site may need for it's user data, and a <code>SiteUser</code> that extends <code>BaseSiteUser</code> and defines a table for the entity.</p>
  
  <p>The idea was that for each individual project we'd overwrite the <code>SiteUser</code> entity by creating a more specific one in the new project's namespace, or use the default one if we don't specify a new one.</p>
  
  <p>Our bundle architecture looks somewhat like this:</p>
  
  <pre><code>OurCompany
    CMSBundle
      Entities
        BaseSiteUser.php
        SiteUser.php
  
  CustomerName
    CustomerProjectBundle
    CMSBundle
      Entities
        SiteUser.php
  </code></pre>
  
  <p>Our problem is that we can't build the model so that the <code>SiteUser</code> defined in <code>CustomerName\CMSBundle</code> is used instead of the one in <code>OurCompany\CMSBundle</code>. Instead, we get this error:</p>
  
  <pre><code>  [Doctrine\DBAL\Schema\SchemaException]
    The table with name 'siteuser' already exists.
  </code></pre>
  
  <p>We tried consulting the <a href="http://symfony.com/doc/current/cookbook/bundles/override.html" rel="nofollow">documentation</a>, but that part has not been covered yet. Searching the web did not provide a solution, either.</p>
  
  <p>We are using the annotation method for defining the model.</p>