File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/koan/java/org/neo4j/tutorial Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ public void shouldVisitAllNodesAndRelationships() throws Exception
84
84
// SNIPPET_START
85
85
86
86
cql = "MATCH (a)\n " +
87
- "OPTIONAL MATCH (a)-[r]-()\n " +
87
+ "OPTIONAL MATCH (a)-[r]-> ()\n " +
88
88
"SET a.visited = true \n " +
89
89
"SET r.visited = true \n " ;
90
90
@@ -122,12 +122,12 @@ private boolean ensureVisited( Iterable<? extends PropertyContainer> propertyCon
122
122
{
123
123
for ( PropertyContainer container : propertyContainers )
124
124
{
125
- if ( !(container .hasProperty ( "visited" ) && container .getProperty ( "visited" ).equals ( "true" )) )
125
+ if ( !(container .hasProperty ( "visited" ) || ! container .getProperty ( "visited" ).equals ( "true" )) )
126
126
{
127
- return true ;
127
+ return false ;
128
128
}
129
129
}
130
- return false ;
130
+ return true ;
131
131
}
132
132
133
133
@ Override
You can’t perform that action at this time.
0 commit comments