Skip to content

OngoingReading is not immutable #907

@Andy2003

Description

@Andy2003

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 *"

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions