<p dir="auto">Environment:</p>
<ul dir="auto">
<li>
<p dir="auto">Neo4j version: 3.2.0</p>
</li>
<li>
<p dir="auto">Operating system: Linux 3.10.0-327.13.1.el7.x86_64</p>
</li>
<li>
<p dir="auto">API/Driver: ( Cypher/Java API)</p>
</li>
<li>
<p dir="auto"><strong>Steps to reproduce</strong><br>
run query:<br>
MATCH ()-[r0:<code class="notranslate">ACCOUNT_OF</code>]-() WHERE ID(r0)=145073  WITH STARTNODE(r0) AS n, ENDNODE(r0) AS m MATCH p1 = (n)-[*0..1]-() WITH COLLECT(DISTINCT p1) AS startPaths, m MATCH p2 = (m)-[*0..1]-() WITH startPaths, COLLECT(DISTINCT p2) AS endPaths WITH startPaths + endPaths AS paths UNWIND paths AS p RETURN DISTINCT p</p>
</li>
<li>
<p dir="auto">Expected behavior<br>
as in earlier version, for example:<br>
(no rows)</p>
</li>
<li>
<p dir="auto">Actual behavior<br>
Neo.DatabaseError.General.UnknownError<br>
key not found: UNNAMED108 (different numbers)</p>
</li>
</ul>
<p dir="auto">it causes to cautch exception in my code:<br>
java.lang.RuntimeException: org.neo4j.ogm.exception.TransactionException: key not found:   UNNAMED106<br>
at org.neo4j.ogm.drivers.bolt.request.BoltRequest.executeRequest(BoltRequest.java:176)<br>
at org.neo4j.ogm.drivers.bolt.request.BoltRequest.execute(BoltRequest.java:67)<br>
at org.neo4j.ogm.session.delegates.LoadOneDelegate.load(LoadOneDelegate.java:62)<br>
at org.neo4j.ogm.session.Neo4jSession.load(Neo4jSession.java:155)</p>
<h3 dir="auto">Steps to reproduce</h3>
<p dir="auto">Run cypher query:</p>
<p dir="auto"><code class="notranslate">MATCH p=(n)-[*0..1]-() RETURN COLLECT(DISTINCT p)</code></p>
<p dir="auto">Fails with:<br>
<code class="notranslate">MATCH p=(n)-[*0..]-() RETURN COLLECT(DISTINCT p) ERROR Neo.DatabaseError.General.UnknownError key not found: UNNAMED12</code></p>
<p dir="auto">Note that it doesn't fail when the path doesn't have length limit.</p>
<h2 dir="auto">Expected behaviour</h2>
<p dir="auto">As in previous versions.</p>
<h2 dir="auto">Environment</h2>
<ul dir="auto">
<li>Neo4j version: 3.2.0</li>
<li>Operating system: XUbuntu 16.04</li>
<li>API/Driver: Cypher/Java API/ neo4j-shell</li>
</ul>