I am learning cakePHP 3 and trying to store hierarchical data in a table. I have added parent_id, lft and rght columns. Added $this->addBehavior(‘Tree’) in initialize method for this table. Calling recover method.
So seems all is done as described here: https://book.cakephp.org/3.0/en/orm/behaviors/tree.html But no one child row is returned.
That is interesting, that childCount returns -0.5 for each row (no matter if the row has children or not, always -0.5).
I am newbie in cakePHP, so maybe someone can help, what I am doing wrong?