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