-
Notifications
You must be signed in to change notification settings - Fork 412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with the WITH clause: Vertex assigned to variable <x> was deleted. #1954
Comments
Update: the following query below does work (so you can see the result). It is generating all the steps in one create. But the WITH statement should just work as intended? So the bug remains. SELECT * FROM cypher('my_graph', $$
MATCH (node1:NodeType1)-[rel:RelType]->(node2:NodeType2)
WHERE NOT exists((node1)-[:RelType2]-(:NodeType3)-[:RelType2]-(node2))
AND node1.project = 'PROJECT_ID'
AND node2.project = 'PROJECT_ID'
CREATE (node1)-[:RelType2 {uri: 'https://example.com/ns#RelType2'}]->(newNode:NodeType3 {
name: node1.name + '|' + node2.name,
uri: 'https://example.com/ns#NodeType3',
project: 'PROJECT_ID',
executionType: 'AUTO'
})<-[:RelType2 {uri: 'https://example.com/ns#RelType2'}]-(node2)
RETURN node1, node2, newNode
$$) AS (n1 agtype, n2 agtype, n3 agtype); |
A few questions (NodeType1)-[]->(NodeType3) else it has a risk of creating duplicate link, if one of the links is missing, prior to query execution. |
This issue is stale because it has been open 60 days with no activity. Remove "Abondoned" label or comment or this will be closed in 14 days. |
I am working with Apache AGE and I am trying to create new nodes and relationships based on existing nodes and their relationships. Here is a simplified version of my schema and queries. These can be used to reproduce the problem.
I wanted to look for existing relationships and create new nodes and relationships connected to the found nodes.
However, it seems to be able to find the nodes, but when adding the WITH statement, it no longer creates nodes and is unable to find them.
This works fine in a neo4j context, so i assume this is a bug with the WITH clause.
Schema Setup
preparation script (if age extension does not exist).
pastable setup script:
Working Query (creates nodes but not relationships)
Failing Query (tries to create relationships, but fails)
This results in the error:
Alternative Query (without WITH clause, also fails)
This also results in the error:
What We Have Tried
WITH
clauses to alias variables.None of these approaches have resolved the issue, and we consistently encounter the vertex deletion error.
The text was updated successfully, but these errors were encountered: