Hi, I just started using Neo4j and I've got a pretty basic question. I've been
running the gem using JRuby but I'm having trouble calling on edges/nodes I've
made in previous transactions. So one of the very basic example scripts I've
been working with looks like:
require rubygems
require 'neo4j'
Neo4j::Transaction.run do
a = Neo4j::Node.new :name = 'A'
b = Neo4j::Node.new :name = 'B'
c = Neo4j::Node.new :name = 'C'
d = Neo4j::Node.new :name = 'D'
e = Neo4j::Node.new :name = 'E'
a.outgoing(:friends) b c
b.outgoing(:friends) d e
c.outgoing(:friends) b
end
If I call on any of those within the same transaction, things work great, but
if I run that and then open a new transaction to query it, say:
Neo4j::Transaction.run do
a.outgoing(:friends).depth(2).each {|node| puts node[:name]}
end
I get undefined local variable errors for a. I thought that maybe I was missing
a step where the database committed, but when I tried to switch over to the
Transaction.new ... Transaction.finish formulation, I started getting
undefined method errors for 'finish'... I assume I'm missing some basic step,
but didn't see an answer in the examples/documentation, so I'd appreciate any
help!
Kristen
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user