I
I
Igor2019-10-31 05:33:05
nested set
Igor, 2019-10-31 05:33:05

Nested set, set of root categories?

Colleagues, the third day I use the Nested set.
I use "gedmo/doctrine-extensions": "2.4.*" I plan to
create many root categories.
That is the task.
Noticed an odd feature.
If the roots themselves begin to move, for example, place 1 root element in another root element.
Then the element that was placed in another root element retains a reference to the root element of the previously created root element.
For example:
As shown in the picture below, if I move the sports branch, for example to auto, no errors are observed, but when I assign a non-existing parent. (for example sports to make a root element). Immediately everything moves out and lvl and lft and rgt become incorrect.
5dba471605d65454676783.png
As I understand it, all the problems are due to the root_id.
gedmo/doctrine-extensions prevents it from being changed.
We say, they say, do not touch root, change the parent!
No errors are observed if there is only one root element.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question