[Neo4j] Confirming existence of relationship between two nodes

gsingh93 gsingh_2011 at yahoo.com
Sat Nov 12 02:04:24 CET 2011

I have two nodes, NodeA and NodeB, that are related by the relationship of
type RelType. Is there a way I can confirm that these two nodes have this
relationship? At the moment, I have to create an Iterable of relationships
of that type connected to NodeA using getRelationships(RelType), and then I
have to loop through each relationship and check the other node to see if at
least one matches NodeB. This seems very inefficient to me. I'm hoping there
is a built in method to check this for me, although I couldn't find one. I'm
using Java.

View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Confirming-existence-of-relationship-between-two-nodes-tp3501458p3501458.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.

More information about the User mailing list