Hi Ahmed,
Can you sketch how your data looks? Otherwise it's hard to see where the NPE
might occur.
Jim
On 4 Aug 2011, at 08:03, ahmed.elsharkasy wrote:
> i tried this
> Iterable<Relationship> relations =
> node.getRelationships(DynamicRelationshipType.withName("PRECEDES_" +Id),
> Direction.BOTH);
>
> Iterator<Relationship> itr = relations.iterator();
>
> while (itr.hasNext()) {
>
> Relationship relationship = itr.next();
> relationship.delete();
>
> }
>
> and i am having this error
> Exception in thread "main" java.lang.NullPointerException
> at
> org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.nodeLoadLight(ReadTransaction.java:81)
> at
> org.neo4j.kernel.impl.persistence.PersistenceManager.loadLightNode(PersistenceManager.java:82)
> at
> org.neo4j.kernel.impl.core.NodeManager.getNodeForProxy(NodeManager.java:466)
> at
> org.neo4j.kernel.impl.core.NodeProxy.getRelationships(NodeProxy.java:104)
>
> --
> View this message in context:
> http://neo4j-community-discussions.438527.n3.nabble.com/Delete-Nodes-connected-by-a-certain-relationship-tp3224430p3224527.html
> Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
> _______________________________________________
> Neo4j mailing list
> [email protected]
> https://lists.neo4j.org/mailman/listinfo/user
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user