Though that is kind of telling me that relationships only exist in java as wrappers for an ordered tuple of nodes. I guess I was thinking that they were stored/accessed differently as unique objects(since they each have an id)... maybe they are but neo4j isn't exposing a method for parsing relationships directly, that is without going through a node first. The method you suggested seems like the long way to parse all relationships. Still, I will use it nonetheless ;)
Thank you! On Fri, Jul 22, 2011 at 11:57 PM, Michael Hunger < michael.hun...@neotechnology.com> wrote: > for (Node node : db.getAllNodes()) for (Relationship rel : > node.getRelationships(Direction.OUTGOING)) { > // your code here > } > > Michael > > Am 22.07.2011 um 23:40 schrieb John cyuczieekc: > > > How would I go about getting all relationships in the entire database ? > > (with neo4j embedded) > > I see there is an db.getAllNodes() for nodes > > is there something similar for relationships? > > > > On Wed, Jul 20, 2011 at 7:13 PM, cyuczi eekc <cyuczie...@gmail.com> > wrote: > > > >> Is there a way to get the number of relationships without having to > iterate > >> through (and count++) them? > >> ie. rels=firstNode.getRelationships(); > >> rels.size(); //doesn't actually exist > >> > > _______________________________________________ > > Neo4j mailing list > > User@lists.neo4j.org > > https://lists.neo4j.org/mailman/listinfo/user > > _______________________________________________ > Neo4j mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user > _______________________________________________ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user