Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query#create with has props may interpret values as props #267

Open
subvertallchris opened this issue Aug 15, 2016 · 0 comments
Open

Query#create with has props may interpret values as props #267

subvertallchris opened this issue Aug 15, 2016 · 0 comments

Comments

@subvertallchris
Copy link
Contributor

subvertallchris commented Aug 15, 2016

In the other gem, ActiveRel has the ability to gradually assemble a Cypher query that will create a rel and one or both nodes in a single call. This is done using the Query API. While working on importing data at work, I came across a weird bug: an artist whose name is wrapped in curly brackets was being treated as a param. As it happened, this artist's name also had a character in it that would lead to an invalid param, so my call blew up.

I wrote a failing spec in the other gem but I'm not sure that the issue belongs there, so I'm gonna start here. You can see the spec here.

My workaround where ActiveRel is concerned will probably be to just change the factory to use set. Alternatively, I can build my own create String and specify one param for the entire hash but I worry it's too brittle.

As for Query#create, I think that the rule should be that String values given to hashes should always be converted into params. This seems to be where it's happening now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant