I have a repository method that returns a list of lists.
List<List<RouteRelationship>> findPaths(String a, String z, String rate);
When I run my query with the repository method defined as above, I get no data returned. However if I change the method signature to the below, I do get results as you can see in the debugger screen shot. How should I declare the return type of findPaths
?
List<Object> findPaths(String a, String z, String rate);
Here's the cypher query I'm using:
MATCH p=(a:Ne{Entity_ID:"276::"})-[r:ROUTE*1..20]-(z:Ne{Entity_ID:"355::"})
WHERE all(x IN relationships(p) WHERE (type(x) = "ROUTE" and x.Route_Type = "OPT" and x.Route_Rate="OC3"))
UNWIND nodes(p) as node
with p, count(distinct node) as distinctNodes, count(node) as allNodes where distinctNodes = allNodes
WITH [x in relationships(p) where type(x)="ROUTE" and x.Route_Type="OPT" and x.Route_Rate="OC3" and not exists(x.Derived)] as f
return collect(f)
And the result (from the Desktop browser):
[[
{
"Route_Type": "OPT",
"Route_AENDNEID": "276::",
"Date_NetworkExtract": 1554975843103,
"Route_ID": "275::::1::5::2-276::::1::3::1",
"Route_ZENDNEID": "275::",
"Route_Rate": "OC3"
}
,
{
"Route_Type": "OPT",
"Route_AENDNEID": "281::",
"Date_NetworkExtract": 1554975843103,
"Route_ID": "275::::1::5::3-281::::1::3::2",
"Route_ZENDNEID": "275::",
"Route_Rate": "OC3"
}
,
{
"Route_Type": "OPT",
"Route_AENDNEID": "281::",
"Date_NetworkExtract": 1554975843103,
"Route_ID": "252::::1::3::2-281::::1::3::1",
"Route_ZENDNEID": "252::",
"Route_Rate": "OC3"
}
,
{
"Route_Type": "OPT",
"Route_AENDNEID": "355::",
"Date_NetworkExtract": 1554975843103,
"Route_ID": "252::::1::3::1-355::::1::3::2",
"Route_ZENDNEID": "252::",
"Route_Rate": "OC3"
}
], [
{
"Route_Type": "OPT",
"Route_AENDNEID": "276::",
"Date_NetworkExtract": 1554975843103,
"Route_ID": "275::::1::5::1-276::::1::3::2",
"Route_ZENDNEID": "275::",
"Route_Rate": "OC3"
}
,
{
"Route_Type": "OPT",
"Route_AENDNEID": "281::",
"Date_NetworkExtract": 1554975843103,
"Route_ID": "275::::1::5::3-281::::1::3::2",
"Route_ZENDNEID": "275::",
"Route_Rate": "OC3"
}
,
{
"Route_Type": "OPT",
"Route_AENDNEID": "281::",
"Date_NetworkExtract": 1554975843103,
"Route_ID": "252::::1::3::2-281::::1::3::1",
"Route_ZENDNEID": "252::",
"Route_Rate": "OC3"
}
,
{
"Route_Type": "OPT",
"Route_AENDNEID": "355::",
"Date_NetworkExtract": 1554975843103,
"Route_ID": "252::::1::3::1-355::::1::3::2",
"Route_ZENDNEID": "252::",
"Route_Rate": "OC3"
}
]]