Neo4j: Relationship direction cypher -
for cypher -
match (m)-[r]-(n) m.name = 'xyz' return n.name, type(r), m.name n.name type(r) m.name xyz belongs_to ordering status xyz runs_on_queue inbound xyz runs_on_db dbxc
in case, ordering status business service "owns" xyz & relation defined follows:
create (xyz)-[:belongs_to]->(order)
type(r) gives relation not direction of relation. still optimal way direction - noticed comment on not being available cypher
neo4j cypher relationship direction
thanks.
not function, can this:
match (m)-[r]-(n) return m.name, type(r), n.name, case when startnode(r) = m 'outgoing' else 'incoming' end direction
Comments
Post a Comment