neo4jrb / activegraph

An active model wrapper for the Neo4j Graph Database for Ruby.
http://neo4jrb.io
MIT License
1.4k stars 276 forks source link

Lost @rel_var alias when using `QueryProxy#branch` #1676

Closed lkalwa closed 1 year ago

lkalwa commented 1 year ago

Using #branch causes the @rel_var of the initial QueryProxy to be lost

@history.students(:student, :enrolledIn).rel_var => :enrolledIn

@history.students(:student, :enrolledIn).branch { all }.rel_var => :rel2

I suppose that bug is present in all versions.

klobuczek commented 1 year ago

the issue is there even without using custom variables

@history.students.all.branch { all }.to_a(false, true)

throws an exception