コマンドを使用doctrine:generate:entity
してエンティティを生成しています。id 型の代わりにguid
( )を使用したいのですが、オプションのように指定すると、次のエラーが発生します。string(32)
integer
id:string(32)
--fields
[Doctrine\ORM\Mapping\MappingException]
Duplicate definition of column 'id' on entity 'Acme\DemoBundle\Entity\Test' in a field or discriminator column mapping.
それを機能させるにはどうすればよいですか?
@answer: @loicfavory が彼の回答へのコメントに書いたように、唯一の方法は、オプションが手動で設定されているSensio\Bundle\GeneratorBundle\Generator\DoctrineEntityGenerator
クラス
を拡張することです。id