如果我们在Gedmo学说树扩展中使用parent_id存在现有层次结构,如何在“关闭"表中填充数据? [英] how to populate data in 'closure' table if we have existing hierachy using parent_id in Gedmo doctrine tree extension?
问题描述
我具有带parent_id列的现有类别层次结构.我已经配置了Gedmo Tree扩展和更新架构.我可以看到级别"列已添加到类别表,并且创建了category_closure表.
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.
如何填充category_closure表中的数据.没有
How do I populate the data in category_closure table. There are no
$repo->verify();
$repo->recover();
ClosureTreeRepository的
方法.我尝试过更新类别记录,以便触发TreeListener,但category_closure中仍然没有数据.
methods for ClosureTreeRepository. I have tried updating category records so that to trigger TreeListener but still there is no data in category_closure.
如何在category_closure表中填充层次结构?
How do I populate hierarchy in category_closure table ?
推荐答案
方法验证和恢复在3.0.x-dev
版本中可用.
Methods verify and recover are available in 3.0.x-dev
version.
您应该自行填充闭包数据.罢工>
You are supposed to populate closure data on your own.
这篇关于如果我们在Gedmo学说树扩展中使用parent_id存在现有层次结构,如何在“关闭"表中填充数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!