Open hannesgeodan opened 3 years ago
me too!
List
I have done this. There are changes in Spring Data Neo4j here: https://stackoverflow.com/questions/68472313/spring-data-neo4j-6-relationship-undirected
So the code needs to be updated as following:
greg = personRepository.findByName(greg.getName());
greg.worksWith(roy);
greg.worksWith(craig);
personRepository.save(greg);
roy = personRepository.findByName(roy.getName());
roy.worksWith(craig);
// We already know that roy works with greg
roy.worksWith(greg);
personRepository.save(roy);
// We already know craig works with roy and greg
craig = personRepository.findByName(craig.getName());
craig.worksWith(roy);
craig.worksWith(greg);
personRepository.save(craig);
Since the solution is in the issue thread, I'm going to mark this one as a good first issue, to encourage someone in the community to try their hand at an OSS contribution.
A few remaks about text surrounding the code:
Lookup each person by name... Greg's teammates => [Roy, Craig] Roy's teammates => [Greg, Craig] Craig's teammates => [Roy, Greg]
Before linking up with Neo4j... Greg's teammates => [] Roy's teammates => [] Craig's teammates => [] Lookup each person by name... Greg's teammates => [Roy, Craig] Roy's teammates => [Craig] Craig's teammates => [] The following have Greg as a teammate... Closing driver instance 61814127