Hi Johann,

There's a workaround that works, but it's not as nice as I'd like it to be.
What you can do is this:

START callee=node:node_auto_index('type:*Service')
MATCH p=(caller)-[r?:CALLS]->(callee)
WHERE r IS NULL
RETURN p

It solves your problem with optional relationships.

HTH,

Andrés

On Fri, Nov 4, 2011 at 1:27 PM, jschweigl <[email protected]> wrote:

> Hi all,
>
> Being a newbie to neo4j/Cypher, didn't come to a solution myself, so I try
> it here: how can I query for a set of nodes which have no incoming relation
> of a specific type? Something like
>
> START callee=node:node_auto_index('type:*Service') MATCH
> p=(caller)-[:CALLS]->(callee)
> RETURN p
>
> just that I want callees which have no caller. Any hints?
>
> Best regards
> Johann
>
> --
> View this message in context:
> http://neo4j-community-discussions.438527.n3.nabble.com/Cypher-question-tp3479960p3479960.html
> Sent from the Neo4j Community Discussions mailing list archive at
> Nabble.com.
> _______________________________________________
> Neo4j mailing list
> [email protected]
> https://lists.neo4j.org/mailman/listinfo/user
>
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to