You don't have to commit a transaction in order to see the changes in it.
You can add a node and a relationship and within that same transaction find
it via a traversal. And then after doing several of those commit and that's
completely fine.

2011/10/24 Rubicon <[email protected]>

> Realized, that I've to give the hole path to the node I'm looking fore...
> have:
> [refNode]----USER--->[user]----HAS_OCCUPATION---->[occupation]
> For some reason the traverser
>         Traverser usersTraverser = firstNode.traverse(Order.BREADTH_FIRST,
>                StopEvaluator.END_OF_GRAPH,
> ReturnableEvaluator.ALL_BUT_START_NODE,
>                RelTypes.HAS_OCCUPATION, Direction.OUTGOING);
> wouldn't find the [occupation] node. Adding additional parameters to the
> traverser (RelTypes.USER, Direction.OUTGOING), and implementing the
> ReturnableEvaluator to return
> currentPosition.lastRelationshipTraversed().isType(RelTypes.HAS_OCCUPATION)
> have done the job.
> Don't have to commit the transaction also.
>
> --
> View this message in context:
> http://neo4j-community-discussions.438527.n3.nabble.com/Traversing-graph-after-adding-node-tp3448023p3448255.html
> Sent from the Neo4j Community Discussions mailing list archive at
> Nabble.com.
> _______________________________________________
> Neo4j mailing list
> [email protected]
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Mattias Persson, [[email protected]]
Hacker, Neo Technology
www.neotechnology.com
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to