diff --git a/cognee/infrastructure/databases/graph/neo4j_driver/adapter.py b/cognee/infrastructure/databases/graph/neo4j_driver/adapter.py index 520295ed2..365d02979 100644 --- a/cognee/infrastructure/databases/graph/neo4j_driver/adapter.py +++ b/cognee/infrastructure/databases/graph/neo4j_driver/adapter.py @@ -1067,7 +1067,7 @@ class Neo4jAdapter(GraphDBInterface): query_nodes = f""" MATCH (n) WHERE {where_clause} - RETURN ID(n) AS id, labels(n) AS labels, properties(n) AS properties + RETURN n.id AS id, labels(n) AS labels, properties(n) AS properties """ result_nodes = await self.query(query_nodes) @@ -1082,7 +1082,7 @@ class Neo4jAdapter(GraphDBInterface): query_edges = f""" MATCH (n)-[r]->(m) WHERE {where_clause} AND {where_clause.replace("n.", "m.")} - RETURN ID(n) AS source, ID(m) AS target, TYPE(r) AS type, properties(r) AS properties + RETURN n.id AS source, n.id AS target, TYPE(r) AS type, properties(r) AS properties """ result_edges = await self.query(query_edges)