how to populate data in 'closure' table if we have existing hierachy using parent_id in Gedmo doctrine tree extension?

假装没事ソ 提交于 2019-12-24 17:03:36

问题


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.



来源:https://stackoverflow.com/questions/33165144/how-to-populate-data-in-closure-table-if-we-have-existing-hierachy-using-paren

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!