我正在使用Symfony2.6,我想在FosUserBundle中制作电子邮件和emailCanonical nullable = true:
/**
* @ORM\Entity
* @ORM\Table(name="fos_user")
* @ORM\AttributeOverrides({
* @ORM\AttributeOverride(name="email", column=@ORM\Column(nullable=true)),
* @ORM\AttributeOverride(name="emailCanonical", column=@ORM\Column(nullable=true, unique=false))
*
* })
*/
更新数据库工作正常,但是当我执行此命令时
php app/console doctrine:generate:entities UserBundle
我收到此错误
[Doctrine\ORM\Mapping\MappingException]
Invalid field override named 'email' for class 'UserBundle\Entity\User'.