cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Relationship between 2 nodes of the same class Spring boot 2.4 sdn6

Hi!
So sdn6 changed from StartNode/EndNode in the Relation to just @TargetNode. The "Start" of the relation is now marked by saving the relation into the object in a list with @Relationship
/
The problem i have is that if i have a relationship for example "Friend_With" from person1->Person2
Then i cant have another type of relation called "Realted_To" from Person2->Person1. Its not getting saved.
I can certainly check if another relation already exists, then find out the direction of that, and then save this with the same direction. But it becomes alot of code and query if there is more then 2 type of relationships between nodes.
/
In case of a Person and a Company i could make one class the owner of all relations, with outgoing/incoming types. But in case of relations between the same class i cant. If an object has relation to another of the same class, then next relation between them has to be the same direction it seems.

0 REPLIES 0