I really believe this position should be reconsidered.
If I want to do the following as an example.
I have something like Skill as a node.
This can be linked to many other things like Course, Job, Person
I don't need the models or Course or Job or Person to be aware of the relationship with Skill. and I don't want Skill to be modified when a new kind of relationship is added. I want to manipulate those relationships by themselves like I could with OGM and RelationshipEntity. By forcing ownership I am now forced to load the relationship or use projections to avoid loading the relationship and forced update the class with @Node as the owner of the relationship when adding a new kind of relationship.
With RelationshipEntity I had a way of adding and querying a relationship without updating the NodeEntity until I decided I wanted that relationship as part NodeEntity.
With SDN 6 I cannot manipulate arbitrary relationships. I have to go to CypherDSL or Neo4J OGM or core Neo4J API.
I always thought that Nodes and Relationships have the same value and standing.
This approach turns Neo4J into a Document database.
If there is something I am misunderstanding I am open to being shown the error of my ways.
Picture me surprise: You mean that you never before attached a @RelationshipEntity
to a @NodeEntity
?
And you are right: If you want to just pick and edit a relationship that is not owned by a node you have to go the manual route. Either be it SDN's Neo4jClient
or the Java driver directly.
Why we did it this way (and it probably won't change in the future):
Also in Neo4j itself a relationship cannot live on it's own. There always needs to be a start and an end node. Bringing this into our object model world, the relationship is the natural connection between different nodes.
This is for me a very similar concept like the well known mapping tables in the relational database world. Also something you would not regularly fetch from the database with a ORM.
What would be interesting for me: Why would you avoid the ownership at all cost?
In most cases, I have @NodeEntity the owns the @Relationship.
There are cases where I will end up loading far too much data if I model the relationship via ownership in a @NodeEntity. In those cases, I like being able to model and manipulate the @RelationshipEntity.
That option is now gone. This means that a part of the model cannot be expressed like the rest of the model, I have to document it separately and manipulate it via CyperDSL or Direct API.