title: Symfony2 FOSUserBundle User entity field override
body: <p>I have a problem with overriding an entity. 
  I need the field <code>emailCanonical</code> to be not be unique.</p>
  
  <p>Here is what I've done:
  In my <code>UserBundle\Resources\config\doctrine\User.orm.xml</code> I've added the following <code>attribute-overrides</code> configuration, according to the Doctrine2 documentation</p>
  
  <pre><code>&lt;attribute-overrides&gt;
      &lt;attribute-override name="emailCanonical"&gt;
          &lt;field column="email_canonical" unique="false" name="emailCanonical" /&gt;
      &lt;/attribute-override&gt;
  &lt;/attribute-overrides&gt;
  </code></pre>
  
  <p>Then I ran the following console commands</p>
  
  <pre><code>$ php app/console doctrine:migrations:diff
  $ php app/console doctrine:migrations:migrate
  </code></pre>
  
  <p>Everything worked fine. <code>emailCanonical</code> was made non unique.
  But now, when I need to generate an entity in other bundles of project, I have a strange error:</p>
  
  <pre><code> $ php app/console doctrine:generate:entities SkyModelsBundle:Category
   Generating entity "Sky\Bundle\ModelsBundle\Entity\Category"
  
   [Doctrine\ORM\Mapping\MappingException]
   Invalid field override named 'emailCanonical' for class 'Sky\Bundle\UserBundle\Entity\User'.
  
   doctrine:generate:entities [--path="..."] [--no-backup] name
  </code></pre>
  
  <p>However, if I remove the override settings from xml mapping, everything works fine.</p>