推动嵌套集行为

时间:2013-03-14 14:02:17

标签: propel nested-sets

我喜欢用propel建立一个定向图。我正在寻找的行为类似于嵌套集,但有一个孩子的多个父母。

存在什么:

P:父节点

C:子节点

  

(0,1)P < - (0,n)C

我需要什么:

  

(0,n)P < - (0,n)C

我读过这个: http://propelorm.org/behaviors/nested-set.html 那个:https://github.com/CraftyShadow/EqualNestBehavior

你能告诉我一些指示吗?

1 个答案:

答案 0 :(得分:0)

我找到了一个解决方案,我在两个关系链接上使用了与同一个表的ManyToMany关系。

table Node
Table ParentNode (ParentFK: Node, NodeFK: Node)