I'm using neo4j with neo4jrb. In irb I use this query:
p = Tag.as(:t).where("t.value = 'Andre'").names(:n).pluck(:n)
I expect to get with p.first
a model from type Person. But as result I get only a CypherNode 3 (53012760)
. The 3 is the ID from the personmodel. But I can't get the model, what am I doing wrong?
Here my models and relationships:
class Tag
include Neo4j::ActiveNode
property :value, index: :exact, constraint: :unique
... more outs ....
has_many :out, :names, rel_class: Names
end
class Names
include Neo4j::ActiveRel
from_class Tag
to_class Person
type 'name'
end
class Person
include Neo4j::ActiveNode
has_many :in, :named, rel_class: Names
end