我有通過Role將查找Permission爲User以下的Cypher查詢: MATCH (p:Permission)<-[:CONTAINS]-(r:Role)<-[:HAS]-(u:User)
WHERE u.id = {userId} AND p.type = {permissionType} AND p.code = {permissionCode}
RETURN p
此查詢工作正
我試圖創建以下的Cypher查詢: MATCH (p:Permission)
WHERE NOT ((p)<-[:HAS|:CONTAINS*1..2]-(u:User) WHERE u.id = {userId}) AND p.minUserReputation <= {minUserReputation}
RETURN p
我需要在所有當前未分配的權限(NOT ((p)<-[:HAS|
我使用此代碼獲得節點a和b之間包含兩個或更少關係的路徑RT。 MATCH (a:Tes1 { title: "a" }),(b:Tes1 { title: "b" }), p=shortestPath((a)-[r:BT|RT*]-(b))
WITH count(type(r)='RT') as cnt
WHERE cnt < 3
RETURN p;
錯誤: Type mismatch: