On Mon, Apr 25, 2011 at 09:29, James Thornton <ja...@jamesthornton.com> wrote: > Is the Java API the only way to create subreference nodes? > > I'm using the Python REST client > (https://github.com/versae/neo4j-rest-client). But it does not appear > that subreference-node creation is exposed via REST, and the normal > Python API doesn't work for 1.3 AFAIK.
Hi, James, I think the subreference nodes are, actually, regular nodes connected to the reference node. As the reference node is the first node in the database and it exists by default, it has the number 0 as id. So, using de Python REST client you can access to it in the next way: >>> gdb = GraphDatabase('http://localhost:7474/db/data') >>> reference_node = gdb.nodes.get(0) >>> reference_node <Neo4j Node: http://localhost:7474/db/data/node/0> Besides, you can use the not documented (sorry, my fault) attribute of the GraphDatabase object: >>> gdb.reference_node <Neo4j Node: http://localhost:7474/db/data/node/0> And you can build your subreference nodes on top of it. I think in the next release of the neo4j-rest-client I will add a gdb.nodes.reference as a convenient shorcut to access to the reference node. Regards. > > Thanks. > > - James > _______________________________________________ > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user -- Javier de la Rosa http://versae.es _______________________________________________ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user