Closed lyamone closed 8 years ago
Hi,
It is not possible to get the uuid at creation time simply because there is no possibility to add additional information from a module to a Cypher result.
What you can do is return the id of the relationship and performs an additional query :
Query1
MATCH (source:User {id:1}),(target:User {id:2})
CREATE (source)-[rel:FOLLOWS]->(target)
Return id(rel) as relId
Query2
MATCH ()-[r]-()
WHERE id(r) = {relId}
RETURN r.uuid as uuid
Thanks! I had thought of the same solution but I didn't know if there was a better way to do it considering the volatility of the neo4j id's.
Hi guys,
I need to know how to get the uuid of the last created node.
For instance, consider this cypher query which doesn't work as expected:
MATCH (source:User {id:1}),(target:User {id:2}) CREATE (source)-[rel:FOLLOWS]->(target) Return rel.uuid
Is there a way to have the uuid of the relationship?
Thanks in advance! Lucas.