Closed muelldlr closed 1 year ago
if arangoDB allows this behavior, then it is doable. Please elaborate with an example. The Edge is defined in your class but not defined as part of a relation?
Please provide a link to test_edge_cases
The relation is defined as:
{
"relation": "HasRelation",
"from_collections": [CollectionA._name],
"to_collections": [CollectionB._name],
}
But in this case, I add a Relation to an Collection, which is not defined above:
node = gc.upsert_node(
CollectionC._name,
{"value": "val1", "value2": "no change", "_key": "v1"},
)
edge = gc.upsert_edge("HasRelation", node, node)
if arangoDB allows this behavior, then it is doable.
I thought about it some more. I would be in favor of checking that out. _edge_definitions should be a kind of contract which relations exist and which collections may be connected to each other and how. Should someone not adhere to it, it is not really noticeable at the present time and others then may wonder why this relation exists at all.
yes I see your point. CAG should not restrict the freedom that ArangoDB offers - This is why it is okay to have this behavior.
All right understood, then I close the ticket
In the process of working on #18 I noticed that I can create edges between collections even though they do not occur
_edge_definitions
. Is this intentional? But then_edge_definitions
would have no purpose. Please take a look attest_edge_cases
for that. Then it should be clear what I mean.