It is not yet possible.
If the new UNWIND functions is in, you'll be able to do it.
> UNWIND {props} as p
> MATCH (I:Interface {IfIPAddress:p.OrigIPAddress})
> MATCH (I2:Interface {IfIPAddress:p.TermIPAddress})
> MERGE (I)-[r:link]->(I2)
> SET r = p
You probably don't want to set all properties of p on the relationship, as you
already connected it to the appropriate nodes.
>
Michael
Am 23.04.2014 um 03:50 schrieb Nipun Agarwal <[email protected]>:
> Is there are way wherein I can prevent merge in cypher to not create node if
> its not present. I have a query like
>
> FOREACH(p in {props} |
> MERGE (I:Interface {IfIPAddress:p.OrigIPAddress})
> MERGE (I2:Interface {IfIPAddress:p.TermIPAddress})
> MERGE (I)-[r:link]->(I2)
> SET r = p)
>
> where the props is a map of arrays.
>
> In the first and second merge I do not want I and I2 to be created. Is it
> possbile?
>
> I am using neo4j version 2.0.1.0.
>
> Please let me know if you need any more information
>
>
> --
> 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 [email protected].
> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.