graphdb = neo4j.GraphDatabase(path)
with graphdb.transaction:
graphdb.getReferenceNode().delete()
referenceNode = graphdb.nodes[0]
referenceNode = graphdb.getRandomNode()
myReferenceNode = node0
graphdb.setReferenceNode(myRootNode)
graphdb = neo4j.GraphDatabase(path, withReferenceNode=False)
I concur with you - I almost always remove the reference node before writing to my database with actual data from my domain.
I don't see SQL databases giving us a "reference table" so I'd be in favour of nuking it and its corresponding API calls.
Jim
I totally agree with you. Let the user decide instead.
https://github.com/neo4j/community/issues/203
Now there is a number of projects and code depending on the reference
node, but we could start with deprecating it if there is enough
opinion behind it. Will check with the others.
Thanks for picking this up!
Cheers,
/peter neubauer
G: neubauer.peter
S: peter.neubauer
P: +46 704 106975
L: http://www.linkedin.com/in/neubauer
T: @peterneubauer
Neo4j 1.6 released - dzone.com/6S4K
The Neo4j Heroku Challenge - http://neo4j-challenge.herokuapp.com/
Hi Paul,
basically Neo4j doesn't handle deletion of the reference node very well and nowadays it makes much sense to have it created on demand and that all dbs are created without it. Also, would named reference nodes be of any use, in that by default there are none but you can get or create reference nodes by name when needed? It's a slightly redundant feature though (there are indexes of course).
2012/5/3 Paul JacksonI am not sure where this stands. I run into issues if I create an empty graph, remove the reverence node, shut down, start up, and add new nodes. The first new node added is given an id of 0. This was OK until I started working in a High Availability environment, because I would know if I am creating a new graph or opening an existing one. In HA, if I create a "new" graph, I am in the dark as to whether I am the actual creator or if it already exists in the system and updates will be injected into my graph (including reference node removal) under the covers. If I then remove the reference node, I can get exceptions if it was already removed by another instance, or I can end up removing a non-reference node if id 0 was reused as can happen.
--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to a topic in the Google Groups "Neo4j" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/neo4j/1nwZk_Z4Ie0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to neo4j+un...@googlegroups.com.