My entity uses this annotation for it\'s ID:
/** * @orm:Id * @orm:Column(type=\"integer\") * @orm:GeneratedValue(s
Although your solution work fine with MySQL, I failed to make it work with PostgreSQL as It's sequence based.
I've to add this line to make it work perfectly :
$metadata->setIdGenerator(new \Doctrine\ORM\Id\AssignedGenerator());
Best regards,