Adjacency list
Hello, tell me please does it support adjacency list in schema definition? It looks like in same table, we have parent id, which refers to an id in the same table.
i try'd like this, but something went wrong...
[
{
"database": "test-db",
"index": "test-index",
"nodes": {
"table": "table_for_example",
"schema": "public",
"columns": [],
"children" : [
{
"table": "table_for_example",
"relationship": {
"variant": "object",
"type": "one_to_many",
"foreign_key": {
"child": ["id"],
"parent": ["parent_id"]
}
}
}
]
}
}
]
Hi @Lelouch1 , I think this comment might help you.
This is not supported yet. It was also requested here. I am still working on this
@toluaina Thank you, I'll be waiting
@toluaina hi, saw the new release, do you solved the problem? thx:)
- I'm afraid this was not solved in the new release.
- Its a bit delicate which is why it wasn't done to start with.
- I have started working on this as you can see from some of the files commited.
Hi! Discover same error when try to add children from same table. Want to make flat architecture from inheritance with adjacency list schema
{
"label": "children",
"table": "same_table",
"columns": [
"id",
"detail"
],
"relationship": {
"type": "one_to_many",
"variant": "object",
"foreign_key": {
"child": [
"parent_id"
],
"parent": [
"id"
]
}
}
}
@toluaina May bee I can help you, if you look at this code fix example:
But still it wont track update parent if new child was added