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

Variables used multiple times breaks Cypher generation (duplicate statement parameters) #250

Open
yarc opened this issue Nov 16, 2021 · 1 comment
Labels
wait for answer Further information is requested

Comments

@yarc
Copy link

yarc commented Nov 16, 2021

I'm currently running version 1.2.0 and i encountered this issue while upgrading to 1.4.0:

I have a query that declares a new argument/variable and references this argument in 4 places in the query. This results in the query crashing with this error message. If instead i keep only 1 reference of the variable the query works.

Parameter 'authUser' is defined multiple times with different bound values: VariableReference{name='authUser'} != VariableReference{name='authUser'} != VariableReference{name='authUser'} != VariableReference{name='authUser'} != VariableReference{name='authUser'}

And stack trace

org.neo4j.cypherdsl.core.ConflictingParametersException: Parameter 'authUser' is defined multiple times with different bound values: VariableReference{name='authUser'} != VariableReference{name='authUser'} != VariableReference{name='authUser'} != VariableReference{name='authUser'} != VariableReference{name='authUser'}
at org.neo4j.cypherdsl.core.ParameterCollectingVisitor.getResult(ParameterCollectingVisitor.java:94) ~[neo4j-cypher-dsl-2021.0.2.jar:2021.0.2]
at org.neo4j.cypherdsl.core.AbstractStatement.collectParameters(AbstractStatement.java:103) ~[neo4j-cypher-dsl-2021.0.2.jar:2021.0.2]
at org.neo4j.cypherdsl.core.AbstractStatement.getParameterInformation(AbstractStatement.java:84) ~[neo4j-cypher-dsl-2021.0.2.jar:2021.0.2]
at org.neo4j.cypherdsl.core.AbstractStatement.getParameters(AbstractStatement.java:53) ~[neo4j-cypher-dsl-2021.0.2.jar:2021.0.2]
at org.neo4j.graphql.handler.BaseDataFetcher.get(BaseDataFetcher.kt:38) ~[neo4j-graphql-java-1.4.0.jar:na]
at org.neo4j.graphql.handler.BaseDataFetcher.get(BaseDataFetcher.kt:20) ~[neo4j-graphql-java-1.4.0.jar:na]

@Andy2003
Copy link
Collaborator

@yarc Can you please test with the current master to see if the problem persists? If so can you provide a testcase.

@Andy2003 Andy2003 added the wait for answer Further information is requested label Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wait for answer Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants