We're attempting to upgrade our spring data version from 5.3 to 6.3. However, we found an issue with creating/updating nodes using the repositories' save method, where it would now delete relationships that we did not intend to change at all. We tried using the repositories' generated find-methods to avoid this, but they "solved it" by loading all connected nodes, no matter the depth. In production, this would result in huge graphs being loaded for simple mutations.
E.g. our Employee nodes have a Supervisor relationship, so the repository loaded the Employee's Supervisor, but also those Employees that the target Employee was Supervisor to, and the Employees those Employees were Supervisor to, and the other Employees the target's Supervisor was Supervisor to, etc. In practice loading one Employee resulted in all Employees being loaded. Plus whatever other nodes those Employees were connected to.
The answer, as in this question, seems to be that the SDN is only intended to be used for objects where loading the entire graph of connections is of limited size. However, this does not seem intuitive (as node relationships are one of the core qualities of a graph database), nor clearly stated in the documentation.
In the classic example from the Neo4j guides of storing Movies, Actors, and Directors, it is quite reasonable to assume that practically every node is connected to every other, due to the many actors having relations to many movies. Is the implied intent in the example to load absolutely all the movies, actors, and directors in your database into memory every time you wish to create or mutate a node?
It just seems hard to intuit, especially since the older version that we are using does work for our use case. Before we start rewriting essentially every mutation in our application, is there some authoritative source that explains how the Spring Data Neo4j team intends it to be used?