Symfony2 Relation ManyToOne
Bonjour à tous, tout à l'heure j'essayais de mettre en place une relation ManyToOne entre deux entités "Candidate" et "CV" mais lorsque je j'exécute la commande doctrine:schema:update --force, doctrine m'affiche ce message d'erreur:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
[Doctrine\DBAL\DBALException]
An exception occurred while executing 'ALTER TABLE CV ADD CONSTRAINT FK_1885FAF891BD8781 FOREIGN KEY (candidate_id) REFERE
NCES Candidate (id)':
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`t
ritux_grh_demo`.`#sql-4dc_26`, CONSTRAINT `FK_1885FAF891BD8781` FOREIGN KEY (`candidate_id`) REFERENCES `Candidate` (`id`)
)
[PDOException]
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`t
ritux_grh_demo`.`#sql-4dc_26`, CONSTRAINT `FK_1885FAF891BD8781` FOREIGN KEY (`candidate_id`) REFERENCES `Candidate` (`id`)
) |
quelqu'un pourrais t'il avoir une idée d'ou ça pourrait provenir :roll: ? Merci.