spring-projects / spring-data-neo4j

Provide support to increase developer productivity in Java when using Neo4j. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.
http://spring.io/projects/spring-data-neo4j
Apache License 2.0
835 stars 618 forks source link

`@Relationship.cascadeUpdates` is ignored for nested Relationships. #2943

Open THE-ORONCO opened 3 months ago

THE-ORONCO commented 3 months ago

Saving a Node N that has a relationship to a parent P which in turn has a relationship to a child C causes the relationship between P and C to be updated, even though the relationship between N and P is set to not cascade updates through cascadeUpdates=false. This means it is impossible to save a node without loading the complete node graph. The weird thing is that the child nodes don't need any populated properties (except the ID), as the cascading update correctly ignores those but not their relationships.

The expected behaviour would be that the relationships of the child nodes also get ignored, when the cascading updates are turned off.

I created a minimal example here.