Stof: Tree lvl doctrine extension does not update

I ask this question here because I have no answer on github.

I use nested tree annotation and presumably when you save such a $ food object:

$food->setParent($vegetables); 

updating parent, lvl and root is done correctly. However, since I am upgrading to Symfony 2.5, the lvl update no longer works, it remains at 0, which makes this tree extension useless.

I cannot even force it (if I manually change lvl before saving, after flush lvl goes back to 0) ...

Does anyone have the same problem?

+4
source share
1 answer

Without seeing more of your code, it's hard to say exactly what the problem is.

- :

$foodRepository = $entityManager->getRepository('AppBundle:Food');
$foodRepository->persistAsFirstChildOf($vegetables, $food);
$entityManager->flush();
+1

All Articles