Symfony 2.3 / FOSユーザーバンドル重複列の定義
-
20-12-2019 - |
質問
DoctrineでFosuserbundleを使用し、マッピングを変更する必要があります。以下のアプローチは、Fine WTH Symfony 2.1.x:
- 私たちのユーザーエンティティはFOS \ userbundle \ model \ user を拡張します
- our mapping.orm.yml bundle で使用されるすべてのフィールドをマッピングします
これは推奨されるアプローチです( https:// github.com / friendsofsymfony / fosuserbundle / blob / master / resources / doc / doctrine.md
symfony 2.3にアップグレードした後、これは機能しません:更新 "doctrine:schema:update --force"がタイプ
のエラーを生成します。 の定義の複製解決
これがあなたが話しているものに関連しているのであれば、属性のオーバーライド
salt
プロパティをNullableにしたい場合は、次のマッピング
# user.orm.yml
Acme\UserBundle\Entity\User:
type: entity
id:
id:
type: integer
generator: { strategy: AUTO }
attributeOverride:
salt:
nullable: true
# Other mapping definitions ...
. 所属していません StackOverflow