Moving root nodes Doctrine Tree Nested Extention

Hi, I’ve stumbled upon the same issue as found by some other developers in the past and the solution which was found common was to create a fake root node. The first link is from the exertion issues. The issue suggests it is solved but I can’t work on it. The data entry is as follows.

        $fruits = new Category();
        $vegetables = new Category();
        $carrots = new Category();
        $homeappliences = new Category();
        $homeappliences->setTitle('Home Appliences');

         $microwave = new Category();
         $microwave->setTitle('Microwave oven');


        $repo = $this->entityManager->getRepository(Category::class);
        // Below line throws error: Invalid sort options specified: field - tree_root, direction - ASC
        // Un-comment to see the error.
//        $repo->reorder(null, 'tree_root');


Hi, I’ve understood the fake category creating suggestions and proceeding with the proposed suggestion in my case. It is below to elaborate on how I saw it and proceed with the suggestion.

In the documentation food is an assumed fake category but it is not mentioned by the developers I’ve taken it as a fake or generalized name to organize the category. So, I’ve put food and home appliances under the Supermarket category as I wanted to show food and home appliances. Furthermore, it also solved my issue regarding the creation of multiple menus. For example, a site has multiple menus, so each can be named and worked with. A top menu, a right menu, a left menu so on and so forth. To elaborate this visually is something like below.

--Super makert
    --Home Appliances
      --Microwave Oven

--Top Menu

--Left Menu
    --My account
      --My Services
          --Service 1
          --Service 2