Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
06-03-2019 06:43 AM
Hi all,
We just started to work with spring data neo4j.
But have run into the problem when creating a node with a relationship to another existing node.
For example: https://stackoverflow.com/questions/36375560/spring-data-neo4j-create-new-node-with-a-relationship-w...
Is it true that we have to write a custom query or fetch the existing node first before being able to create a relationship to that existing node without overriding the current properties?
kind regards
06-06-2019 01:25 AM
You don't need necessarily to write a custom cypher statement to load the (existing) node but it has to be somehow known (e.g. findById
) in the transaction.
If you would create two nodes A
and B
, where B
is the already existing one, Spring Data Neo4j / Neo4j-OGM cannot foresee that B
will already be in the graph when you persist A
.
All the sessions of the conference are now available online