how to populate data in 'closure' table if

2019-08-08 03:56发布

问题:

I have existing category hierarchy with parent_id column. I have configured Gedmo Tree extension and update schema. I can see 'level' column is added to category table and category_closure table is created.

How do I populate the data in category_closure table. There are no

$repo->verify();
$repo->recover();

methods for ClosureTreeRepository. I have tried updating category records so that to trigger TreeListener but still there is no data in category_closure.

How do I populate hierarchy in category_closure table ?

回答1:

Methods verify and recover are available in 3.0.x-dev version.

You are supposed to populate closure data on your own.