I just started reading and playing with graph db and specifically Neo4j.
However I didn't encounter a solution for a use case that seems to me very common. Assume I have User object in my system and I want to maintain the relationships between users. Examples:
- User1 -> User2 - relationship sibling
- UserX -> UserY - relationship parent
- UserY -> UserX - relationship child
- UserX -> UserZ - relationship teacher
I would like to store the relationship (the edge between the nodes) dynamically and not creating an entity with all possible relationships entities with annotation @Relationship.
Later, I would like to get a user and all his connections, but in run-time to figure out what is the type of the relationship.
Is this possible with spring data? or maybe it is not possible at all using Neo4j?
I will appreciate if you can point me to some reading for a solution to my problem.
Thank you.