Open videni opened 5 years ago
what quite strange is the error will disapear if call the sort method twice. ORMPurger
private function getCommitOrder(EntityManagerInterface $em, array $classes)
{
$sorter = new TopologicalSorter();
//....
$sorter->sort(); // call sort method twice.
return array_reverse($sorter->sort());
}
I have this issue today at
doctrine/data-fixtures v1.3.2
, what I did wrong?Order.orm.xml
OrderReview.orm.xmln
Report.orm.xml
the the result table orders are following, but
acme_auto_report
table hold foreign key to acme_order, it must be before theacme_order
table likeacme_order_review
table.Originally posted by @videni in https://github.com/doctrine/data-fixtures/issues/230#issuecomment-556507466