symfony - Symfony2 FOSUserBundle User entity field override -
I have a problem overriding an organization. I do not need the field Here's what I did: XML in my Then I run the following console command Everything worked well You override this using PPL annotations (starting with this principle version 2.3 and above Please note that in the documentation it is mentioned that you can not override the types, although I was able to do this using the latest principle according to 2.4.4 at the time of writing it: It is specified in the documentation: email legal to be unique.
UserBundle \ resources \ config \ doctrine \ User.orm
& lt; Feature-override & gt; Accordingly, I've added the
attribute-override configuration. & Lt; Attribute-override name = "email canonical" & gt; & Lt; Field column = "email_connectional" unique = "wrong" name = "email canonical" /> & Lt; / Feature-override & gt; & Lt; / Feature-override & gt;
$ php app / console doctrine: migration: diff $ php app / console doctrine: migrations: migrate
Email Connection was made non-unique but now, when I need to create a unit in the other bundles of the project, then I have a strange error:
$ php app / console doctrine: generated: entities Skydom's bundle: category building unit "sky \ bundle \ model bundle \ unit \" Invalid field override named "email connical" named for category "[principle \ ORM \ mapping \ mapping exposition] 'Sky bundle \ user bundle \ unit \ user' However, if I remove override settings from XML mapping, then Everything works fine. .
& lt; php namespace namespace \ user bundle \ ucc Use the principle / ORM \ mapping as ORM; Use the Symfony \ Component \ Validator \ Constraints; Use FOS \ UserBundle \ Model \ User as BaseUser; / * * User * @ORM \ Entity * @ORM \ AttributeOverrides ({* @ORM \ AttributeOverride (name = "id", * column = @ ORM \ column (* name = "guest_id", * type = "integer", * length = 140 *) * ) *} * / Class extends myUser BaseUser {/ ** * @ORM \ Id () * @ORM \ column (type = "integer") * @ORM / Generated Value (strategy = "auto") * / Protected $ Id; }
Comments
Post a Comment