Say there are 2 models:
class A
include Neo4j::ActiveNode
property :name, type: String
has_many :in, :bs, type: :HAS_B
end
class B
include Neo4j::ActiveNode
property :name, type: String
end
And following nodes and relations:
a1 <- b1
a2 <- b1
a3 <- b2
a1 <- b2
Now, I want all nodes of label: A
that are in relation to a specific node of label: B
.
How can I achieve that through neo4jrb?
In simple english, I want "All nodes labelled A which have a relation to node b1" (and this can be extended to multiple nodes, like all nodes of label A which have relation with nodes b1 and b2)