So, what you want to do is get all action nodes that relate to a known
place node, right?
That would be done something like this:
Node place = getPlaceNodeInSomeWay();
Iterable<Relationship> actionRelations =
place.getRelationships(ACTION_TO_PLACE_RELATIONSHIP_TYPE,
Direction.INCOMING);
for(Relationship actionRelation : actionRelations) {
Node action = actionRelation.getStartNode();
doSomethingWith(action);
}
Happy hacking
/Tobias
On Fri, Jun 6, 2008 at 8:12 AM, Mark W <[EMAIL PROTECTED]> wrote:
> greetings :)
>
> I want to pull up nodes that satisfy a structure like this:
>
> (actor)-->(action)-->(place1)
> |
> | ------>(action)---->(place1)*
> |
> | ------->(action)---->(place 2)
>
> * note both place1 nodes are really the same node
>
> Loosely speaking, a user performs an action in a certain place. I can
> traverse out, from a given actor, to ALL the actions. But if I only want a
> set for a given place, do I run through them checking for relationships to
> the node i want? This sounds rough for lots of actions..
>
> In SQL, this is reasonably easy, using INNER JOINS, etc.. but obviously
> performance is terrible when you get to large graphs (especially, i've
> noticed, when the joins start looping back on previously returned nodes)
>
> just curious.. answer at leisure.. I'm tinkering
> thx, Mark
> _______________________________________________
> Neo mailing list
> [email protected]
> https://lists.neo4j.org/mailman/listinfo/user
>
--
Tobias Ivarsson <[EMAIL PROTECTED]>
Hacker, Neo Technology
www.neotechnology.com
Cellphone: +46 706 534857
_______________________________________________
Neo mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user