My entity uses this annotation for it\'s ID:
/**
* @orm:Id
* @orm:Column(type=\"integer\")
* @orm:GeneratedValue(s
Solution for Doctrine 2.5 and MySQL
The "New solution" doesn't work with Doctrine 2.5 and MySQL. You have to use:
$metadata = $this->getEntityManager()->getClassMetaData(Entity::class);
$metadata->setIdGenerator(new AssignedGenerator());
$metadata->setIdGeneratorType(ClassMetadata::GENERATOR_TYPE_NONE);
However I can only confirm that for MySQL,because I haven't tried any other DBMS yet.