I’m trying to use Gedmo on an existing category entity with SF 5 but I don’t know how to update the items that already are in my DB.
My Category entity has the Gedmo category fields with the annotations as written in the doc https://github.com/Atlantic18/DoctrineExtensions/blob/v2.4.x/doc/tree.md.
I’m writing a SF Command in order to update the different Gedmo fields for my existing data (lft, lvl, rgt, root, children). I already have the parent in my entity.
I tried to use this :
$repository->verify(); $repository->recover(); $em->flush();
but nothing happened.
I wanted to create new categories but I have references in other tables and I lost the links between them because they had new IDs. (I use a custom UUID generator).
So how to update my database without losing relations between my tables ?
Source: Symfony Questions