0

I don't know why I create a graph in Neo4j, it always have node[0] containing nothing, so when using For loop for Iterator result, I got some exceptions like:

  'title' property not found for NodeImpl#0.
  at org.neo4j.kernel.impl.core.Primitive.newPropertyNotFoundException(Primitive.java:184)
  ....

How can I deal with this problem?? I'm thinking use a Cypher query that have a starting point from node[1], but I don't know how to make this query or ignore node[0] when looping?

kennek
  • 15
  • 4

1 Answers1

0

You can either delete node 0 to get a clean database, or check for the existence of that property prior to accessing it, node.hasProperty(), http://api.neo4j.org/2.0.0-M02/org/neo4j/graphdb/PropertyContainer.html#hasProperty(java.lang.String)

Peter Neubauer
  • 6,311
  • 1
  • 21
  • 24