Re: [Neo4j] Passing nested collection as cypher query parameter to REST endpoint

2014-12-02 Thread Tom Zeppenfeldt
> So this works: > { "query" : "MATCH n-[r]-m WHERE id(n) = 0 WITH CASE WHEN startnode(r)=n THEN (CASE WHEN endnode(r)=n THEN ' SELF' ELSE ' OUT' END) ELSE ' IN' END as direction,type(r) as typer,REDUCE(acc = '', p IN labels(m)| acc + ' :'+ p) AS mlabels,r WITH typer+mlabels+direction AS re

Re: [Neo4j] Passing nested collection as cypher query parameter to REST endpoint

2014-12-02 Thread Tom Zeppenfeldt
Hi michael. I realized I had the same issue a couple of months ago.. will use the same solution.. the weird thing however is that when doing it in the browser, the IN clause allows to compare with nested objects. http://stackoverflow.com/questions/25709309/syntax-issue-passing-objects-as-paramet

Re: [Neo4j] Passing nested collection as cypher query parameter to REST endpoint

2014-12-02 Thread Michael Hunger
can you just try to return {reltypes} I think due to json parsing the nested collections in reltypes are turned into lists which are not equal to the type that is created by the literal syntax could you try a list of maps instead ? On Tue, Dec 2, 2014 at 11:18 AM, Tom Zeppenfeldt wrote: > I

[Neo4j] Passing nested collection as cypher query parameter to REST endpoint

2014-12-02 Thread Tom Zeppenfeldt
I have an problem , probably related to passing a nested collection as a parameter to a cypher query.. In the browser, this works fine: MATCH n-[r]-m WHERE id(n) = 0 WITH CASE WHEN startnode(r)=n THEN (CASE WHEN endnode(r)=n THEN 'SELF' ELSE 'OUT' END) ELSE 'IN' END as direction,type(r) as t