I have an existing data model where I can rename things freely to match CakePHP s conventions. I have a type of graph node, where a node can have an arbitrary number of child nodes and an arbitrary number of parent nodes (uni-directional relationships).
Here s the table of nodes, following CakePHP s conventions:
Table: nodes
Column: node_id (INT)
Column: description (TEXT)
My question is what the join table should look like? Here is what it looks like now:
Table: nodes_nodes
Column: parent_node_id (INT)
Column: child_node_id (INT)
And what the documentation implies it should be:
Table: nodes_nodes
Column: node_id (INT)
Column: node_id (INT)
Notice that two column names are the same, which obviously won t work. What should these two columns be called? Or can CakePHP s conventions not handle this situation without configuration?