Neo4j Cypher Query: How to fetch graph related to entity?




Asked on December 13, 2014
Neo4j Cypher Query:
I have an entity as Employee. I have saves many employee in graph database with some relationship.

How to fetch graph related to my Entity?

Regards
Kamal



Replied on December 13, 2014
1. To get all employee from database, run the cypher query as below.

MATCH (emp:Employee) RETURN emp

2. To fetch all employee with any relation (suppose teammates), run query as below.

Match (emp:Employee)-[:TEAMMATE]-> teammates where emp.name= "ABC" return teammates

Regards
Arvind



Replied on December 13, 2014
Thanks Arvind for the reply.

It is working


Write Answer











©2024 concretepage.com | Privacy Policy | Contact Us