sdn rx 1.0.0-4297f12112372793a8c6d6d3ee57f27e72f16236
Description
Expected clause WHERE:
...
WHERE
(NOT r:LastResume) AND
(((COALESCE(o.valid_only, false) = false) AND NOT r:InvalidStatus) OR (o.valid_only AND r:InvalidStatus)) AND ...
...
Code to produce the clause:
@Test
void or() {
var r = node("Resume").named("r");
var o = node("Offer").named("o");
var s = match(r.relationshipTo(o, "FOR"))
.where(r.hasLabels("LastResume").not())
.and(coalesce(o.property("valid_only"), literalFalse()).isEqualTo(literalFalse())
.and(r.hasLabels("InvalidStatus").not())
.or(o.property("valid_only").isTrue()
.and(r.hasLabels("InvalidStatus"))))
.returningDistinct(r, o)
.build();
System.out.println(Renderer.getDefaultRenderer().render(s));
}
Result:
WHERE
(NOT (r:`LastResume`) AND
coalesce(o.valid_only, false) = false AND NOT (r:`InvalidStatus`) AND (o.valid_only = true AND r:`InvalidStatus`))...
Get .. AND (o.valid_only... instead of .. OR (o.valid_only....
FYI, if I keep only one condition before the OR, it will be in the output result.
Environment
Description Expected clause WHERE:
Code to produce the clause:
Result:
Get
.. AND (o.valid_only...
instead of.. OR (o.valid_only...
. FYI, if I keep only one condition before the OR, it will be in the output result.Did I get it wrong? Thanks