I'm using doctrine:generate:entity
command to generate entities. I want to use guid
(string(32)
) instead of integer
as id type, but when I specify it like id:string(32)
in --fields
option I get following error:
[Doctrine\ORM\Mapping\MappingException]
Duplicate definition of column 'id' on entity 'Acme\DemoBundle\Entity\Test' in a field or discriminator column mapping.
What should I do to get it working?
@answer:
As @loicfavory wrote in comment to his answer the only way is to extend Sensio\Bundle\GeneratorBundle\Generator\DoctrineEntityGenerator
class where id
options are set manually.