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

`proxy_as` should always introduce a `WITH` clause #927

Open cheerfulstoic opened 9 years ago

cheerfulstoic commented 9 years ago

Arguments against?

subvertallchris commented 9 years ago

I think the with would cut off your access to identifiers earlier in the chain unless it also brings along the ids already declared, right? I often drop into Core::Query to express something in the DSL, write part of a query, and then proxy_as to get back to QueryProxy but ultimately pluck something from earlier in the chain.

cheerfulstoic commented 9 years ago

I just noticed that you can do with('*'), which might seem pointless but it can allow you to make MATCH clauses when you've previously done OPTIONAL MATCHes.

We still need to dig into potential issues, but I wanted to note that while I was thinking of it ;)