andreasronge/neo4j — Issue #158: Cannot substitute in to cypher query
Author: pehrlich
Created: 2012-02-16 03:32:44+00:00
State: open

r = Neo4j.query("START n=node(1) RETURN n")
=> #

> r = Neo4j.query("START n=node({nn}) RETURN n", nn: 1)
NativeException: java.lang.ClassCastException: org.jruby.RubySymbol cannot be cast to java.lang.String
from org/neo4j/cypher/pipes/ParameterPipe.scala:31:in `apply'
from scala/collection/TraversableLike.scala:194:in `apply'
from scala/collection/TraversableLike.scala:194:in `apply'
from scala/collection/MapLike.scala:171:in `apply'
from scala/collection/MapLike.scala:171:in `apply'
from scala/collection/immutable/Map.scala:118:in `foreach'
from scala/collection/MapLike.scala:171:in `foreach'
from scala/collection/TraversableLike.scala:194:in `map'
from scala/collection/MapLike.scala:165:in `scala$collection$SetLike$$super$map'
from scala/collection/SetLike.scala:93:in `map'
from scala/collection/MapLike.scala:165:in `map'
from org/neo4j/cypher/pipes/ParameterPipe.scala:31:in `'
from org/neo4j/cypher/ExecutionEngine.scala:69:in `execute'
from org/neo4j/cypher/ExecutionEngine.scala:49:in `execute'
from org/neo4j/cypher/javacompat/ExecutionEngine.java:91:in `execute'
from /Users/peter/.rvm/gems/jruby-1.6.6/gems/neo4j-1.3.1-java/lib/neo4j/neo4j.rb:86:in `query'
from (irb):16:in `evaluate'
from org/jruby/RubyKernel.java:1082:in `eval'
from org/jruby/RubyKernel.java:1408:in `loop'
from org/jruby/RubyKernel.java:1195:in `catch'
from org/jruby/RubyKernel.java:1195:in `catch'
from /Users/peter/.rvm/gems/jruby-1.6.6/gems/railties-3.1.0/lib/rails/commands/console.rb:45:in `start'
from /Users/peter/.rvm/gems/jruby-1.6.6/gems/railties-3.1.0/lib/rails/commands/console.rb:8:in `start'
from /Users/peter/.rvm/gems/jruby-1.6.6/gems/railties-3.1.0/lib/rails/commands.rb:40:in `(root)'
from org/jruby/RubyKernel.java:1036:in `require'
from script