neo4j / cypher-dsl

A Java DSL (Builder) for the Cypher Query Language
http://neo4j.github.io/cypher-dsl
Apache License 2.0
198 stars 64 forks source link

OngoingReading is not immutable #907

Open Andy2003 opened 10 months ago

Andy2003 commented 10 months ago

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 *"
michael-simons commented 10 months ago

That will gonna take some time…

Andy2003 commented 2 months ago

Any update on this?

michael-simons commented 2 months ago

Not as of now.