title: Neo4j OGM 2.0 query path
body: <p>I am trying to perform a query which returns a path, however, although the same query executed in <code>neo4j Web UI</code> returns a correct result, the <code>neo4j-ogm</code> returns <code>null</code>. I have installed <code>neo4j-ogm-api,core:2.0.0-M01</code> from Maven.</p>
  
  <p>My java code looks as follows:</p>
  
  <p>Root.java:</p>
  
  <pre><code>@NodeEntity
  public class Root
  {
      @GraphId
      public Long id;
  
      @Relationship(type = "Branch", direction = Relationship.OOUTGOING)
      public List&lt;Branch&gt; branches = new ArrayList&lt;&gt;();
  
      public Branch addLeaf(Leaf leaf, float length)
      {
          Branch b = new Branch(this, leaf);
          b.length = length;
          leaf.branch = b;
          branches.add(b); 
          return b;           
      }
  }
  </code></pre>
  
  <p>Leaf.java:</p>
  
  <pre><code>@NodeEntity
  public class Leaf
  {
      @GraphId
      public Long id;
  
      @Property
      public String color;
  
      @Relationship(type = "Branch", direction = Relationship.INCOMING)
      public Branch branch;
  }
  </code></pre>
  
  <p>Branch.java:</p>
  
  <pre><code>@RelationshipEntity
  public class Branch
  {        
      @GraphId
      public Long id;
  
      public Branch(Root root, Leaf leaf)
      {
          this.root = root;
          this.leaf = leaf;
      }
  
      @Property
      public float length;
  
      @StartNode
      public Root root;
  
      @EndNode
      public Leaf leaf;
  }
  </code></pre>
  
  <p>Then, for testing let's do</p>
  
  <pre><code>public class Main {
  
      public static void main(String[] args) {
  
          SessionFactory sessionFactory = new SessionFactory("com.my.package.name");
          Session session = sessionFactory.openSession();
  
          Root r = new Root()
          r.addLeaf(new Leaf(), 1);
          r.addLeaf(new Leaf(), 2);
          session.save(r);
  
          //Until this point everything is alright and
          // all 3 nodes and 2 relationships are created
  
          String query = "MATCH path = (l1:Leaf)-[*1..100]-(l2:Leaf) WITH path LIMIT 1 RETURN path";
          QueryResultModel qrm = session.query(query, new HashMap&lt;String, Object&gt;());
          // qrm.result.get(0).get("path")  is null
      }
  }
  </code></pre>
  
  <p>Please, explain to me what am I doing wrong?</p>