Re: [Neo4j] Java and loop relationships

2018-04-30 Thread 'Michael Hunger' via Neo4j
Your startNode is the parent again. You have to access the endNode to get
the sons.

and your forEach gets passed in the relationships, then you can access
either start/end-nodes, types or properties.

If you're unsure about Java8 streams, there are tons of materials to look
up syntax for forEach and the other operations.

Michael

On Wed, Apr 25, 2018 at 12:37 PM,  wrote:

> i am trying to do :
>
> Node node1= 
> parentNode.getSingleRelationship(RelationshipType.withName("SON"), 
> Direction.OUTGOING).getStartNode();
>
> node1.getRelationships(RelationshipType.withName("SON"),Direction.OUTGOING).forEach(Relationship
>  *xxx *: *yyy*){};
>
> the part that i am missing is *xxx *: *yyy*
>
>
> *idea?*
>
> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Neo4j] Java and loop relationships

2018-04-30 Thread developerlearn999
i am trying to do :

Node node1= parentNode.getSingleRelationship(RelationshipType.withName("SON"), 
Direction.OUTGOING).getStartNode();

node1.getRelationships(RelationshipType.withName("SON"),Direction.OUTGOING).forEach(Relationship
 *xxx *: *yyy*){};

the part that i am missing is *xxx *: *yyy*


*idea?*

-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.