2

I have a linked list such that every node has a 'next' relation pointed to the next node, the first node has another relation : 'first' which pointed to it from some category. I'm trying to write a delete function that uses cypher to do so but I keep getting this error :

Received an unexpected HTTP status when executing the request.
The query was: MATCH (c:Cat {id:{id}})-[:Post]->(p:Post{id:{pid}})

My try :

        gclient.Cypher
               .Match("(c:Cat {id:{id}})-[:Post]->(p:Post{id:{pid}})")
               .Match("(p)-[nn:next]->(np:Post)")
               .OptionalMatch("(c)-[old:first]->(p)")
               .OptionalMatch("(ppost:Post)-[pn:next]->(p)")
               .WithParams((new
               {
                   id = catId,
                   pid = postId
               }))
               .Create("(ppost)-[:next]->(np)")
               .With("old, p, c, np")
               .Where("old IS NOT NULL")
               .Create("(c)-[:first]->(np)")
               .With("p, old")
               .Delete("old")
               .Delete("p")
               .ExecuteWithoutResults();
Rawhi
  • 6,155
  • 8
  • 36
  • 57
  • If I had to guess I would say that error is coming from neo4jclient. Maybe try reproducing that Cypher in the Neo4j web console to see if you can see what error message is coming from Cypher? – Brian Underwood Jul 05 '15 at 21:08
  • 1
    I presume the error si there because the `p` node still has other relationships, perhaps an outgoing next which you have not deleted. – Michael Hunger Jul 05 '15 at 22:39

0 Answers0