Home  >  Forum  >  Database
Post New Query

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


joined on
June 15,2014
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
joined on
March 14,2013
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
joined on
June 15,2014
Replied on December 13,2014

Thanks Arvind for the reply.

It is working

Write Answer



Sitewide-Feb4of4234x60





Copyright ©2017 concretepage.com, all rights reserved |Privacy Policy | Contact Us