Question

I woudl like to build an oriented Graph using propel. The behavior I am looking for is similar to the nested set but with multiple parents for one child.

What exists:

P: Parent Node

C: Child Node

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

What I need:

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

I have read this: http://propelorm.org/behaviors/nested-set.html and that: https://github.com/CraftyShadow/EqualNestBehavior

Could you give me some direction please?

Was it helpful?

Solution

I found a solution, I am using a ManyToMany relationship with the same table on the two relations links.

table Node
Table ParentNode (ParentFK: Node, NodeFK: Node)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top