Using symfony2 and doctrine2 with doctrine tree extension, I have recently updated an entity to make it a doctrine nested set tree.
A doctrine schema update force added the right columns with null data.
Then I ran the following code :
$repo = $this->getDoctrine()->getRepository('AppBundle:FoodAnalytics\Recipe');
$repo->verify();
// can return TRUE if tree is valid, or array of errors found on tree
$repo->recover();
$this->flush(); // important: flush recovered nodes
// if tree has errors it will try to fix all tree
It successfully recovered left right and level values but not root. I can't manually set root values (prohibited by doctrine listener).
How can I update those root values so the tree could work properly ?
Thanks !