Is there an example of a self-referential table?
example: I'm implementing a tree of nodes.
The node table has a nullable parent_id column.
How would I implement trees of arbitrary depth?
Currently, every node is just referencing itself.
{
"otherStuff": "excludedForBrevity",
"parent_id": {
"type": "same_as",
"ref": "org_unit.content.id"
}
}
Is there a way to change the ref so it's not referencing its own id column?
Is there an example of a self-referential table?
example: I'm implementing a tree of nodes.
The
nodetable has a nullableparent_idcolumn.How would I implement trees of arbitrary depth?
Currently, every node is just referencing itself.
{ "otherStuff": "excludedForBrevity", "parent_id": { "type": "same_as", "ref": "org_unit.content.id" } }Is there a way to change the
refso it's not referencing its ownidcolumn?