li yangtao
li yangtao

Reputation: 15

How to recreate reference node in a neo4j database after i have deleted it?

I writed my java code like this:

GraphDatabaseService dblp =new EmbeddedGraphDatabase("GraphDb/dblp");
((EmbeddedGraphDatabase) dblp).getConfig().getGraphDbModule().createNewReferenceNode();

as you see, but it doesn't work. so, i want to know how should i do to solve the problem.

Upvotes: 0

Views: 126

Answers (1)

Michael Hunger
Michael Hunger

Reputation: 41676

Unfortunately it is not persisted :(

So you can use the Neo4j batch-inserter to create a new node with id 0.

BatchInserter inserter = 
     BatchInserters.inserter( "target/batchinserter-example", fileSystem );
inserter.createNode(0,new HashMap());
inserter.shutdown();

Upvotes: 1

Related Questions