【发布时间】:2017-01-21 14:02:58
【问题描述】:
我有以下密码查询:
MATCH (parentD)-[:CONTAINS]->(childD:Decision)-[ru:CREATED_BY]->(u:User)
WHERE id(parentD) = {decisionId}
RETURN ru, u, childD
SKIP 0 LIMIT 100
Decision实体可以属于0..N个Tenant对象
@NodeEntity
public class Decision {
private final static String BELONGS_TO = "BELONGS_TO";
@Relationship(type = BELONGS_TO, direction = Relationship.OUTGOING)
private Set<Tenant> tenants = new HashSet<>();
....
}
我需要扩展上面的 Cypher 查询以返回所有childD,其中parentD 和childD 不属于Tenant 中的任何一个或不属于Tenant,ID 设置在{tenantIds} 中。请帮我解决这个问题。
【问题讨论】:
标签: neo4j cypher spring-data-neo4j