The Following code fails, b/c the match is not immutable:
var node = Cypher.anyNode().named("foo");
var match = Cypher.match(node);
var property = node.property("foo");
// this is another statement we defer from the match
var otherStatement = match.with(node)
.returning(property)
.build();
var cypher = match
.returning(Cypher.asterisk())
.build().getCypher();
assertThat(cypher).isEqualTo("MATCH (foo) RETURN *");
I get an assertion error:
expected: "MATCH (foo) RETURN *"
but was: "MATCH (foo) WITH foo RETURN *"
The Following code fails, b/c the match is not immutable:
I get an assertion error: