title: Find nodes that has a particular relationship with the input node in Neo4j
body: <p>I have nodes with name and id property. These nodes have friend relationship with other nodes. Like {John}-[Friend]->{Paul},{John}-[Friend]->{Jose},{Jose}-[Friend]->{Paul}</p>
  
  <p>Creating User</p>
  
  <pre><code>session.run( "CREATE (a:User {name: {name}, id: {id}})",
              parameters( "name", name, "id", id ) );
  </code></pre>
  
  <p>Creating Relationships</p>
  
  <pre><code>session.run("MATCH (a:User),(b:User) WHERE a.id = {node1} AND b.id = {node2} CREATE (a)-[r:FRIENDS]-&gt;(b)",
              parameters( "node1", id1, "node2", id2 ) );
  </code></pre>
  
  <p>Now I am looking for query John's friend, which should list me paul and jose. How do i do that ? Tried the below and getting empty result. Not able to figure out why</p>
  
  <pre><code>session.run("MATCH (a:User{id:{id}})&lt;-[:FRIEND]-(actor) RETURN a.id",
              parameters( "id", user ) );
  </code></pre>
  
  <p>Thanks for the help</p>