Open klobuczek opened 5 years ago
Further insights. Even this simpler case exposes what I believe, after some analysis, is the same bug as above and fixing the below will fix as well the above.
[7] pry(main)> Role.manager.branch { manager }
=> Role#manager#manager
MATCH (node2:`Role`)
MATCH (node2)-[rel1:`manager`]->(result_manager:`Role`)
MATCH (result_manager)-[rel2:`manager`]->(result_manager:`Role`)
RETURN result_manager
The generated query should return all managers which have their own managers, not managers which are their own manager.
The following code
generates the following cypher:
which is wrong in 2 accounts
result_lookups
for both match conditions.ID_result_lookups
Please note that the relationships are aliased correctly with
rel1
andrel3
.The correct cypher query should be:
Please note that the cypher is generated with
which however is not relevant in this issue as any other property in the where condition is experiencing the same problem.
Additional information which could be helpful if relevant to your issue:
Code example (inline, gist, or repo)
Runtime information:
Neo4j database version:
neo4j
gem version:neo4j-core
gem version: