简体   繁体   中英

NEO4J - Retrieve uni directional relationship between nodes

Imagine I have 2 nodes A & B where relation from

A -> B is x

and relation from

B -> A is y

Is there a way where I can get just the outgoing relations from A ?

Like I need a CQL when asked for A -> B , gives me only x

EDIT:

I'm looking for a query which gives me relation from A -> B (only), not from B-> A

Thanks for your time.

You can simply do this to match all outgoing relations from A:

Match (A:yourLabel{yourProperty: theValue})-[r]->(B) return r

This will return all the outgoint relations from A.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM