Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include the option of creating multiple entity relationships in RelationshipOperationsRepository [DATAGRAPH-152] #720

Closed
spring-projects-issues opened this issue Dec 14, 2011 · 2 comments
Labels
in: core type: enhancement
Milestone

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Dec 14, 2011

Juan Pablo opened DATAGRAPH-152 and commented

While dealing with entity relationships, currently the only way of creating multiple relationships of the same type between two nodes is by using neo4j-template. It would be interesting to have it available from a RelationshipOperationsRepository.

Don't know if it would make sense to allow it also from the annotated entity with some kind of @RelatedToVia(multiple=true) so as there would be no need to use the repository directly.

IMHO, i wouln't include the same option for @RelatedTo, as there would be no "useful" information on having multiple relationships of the same type between two nodes, that would be equivalent to having a single relationship with a "counter" property, which has more sense, right?


Affects: 2.0.RC1

Reference URL: http://forum.springsource.org/showthread.php?114614-Spring-Data-Graph-Why-only-one-relationship-of-a-type-between-two-nodes&p=393512#post393512

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Dec 15, 2011

Juan Pablo commented

One note: when creating duplicate relationships externally, it's not possible to update node properties without "destroying" duplicates. I guess this is because the duplication control filters all those created externally

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Dec 15, 2011

Michael Hunger commented

There is no notion of externally or internally created relationships.

The constraint on unique relationships is needed to allow automatic delta detection of changes in related-node-collections. If duplicates are allowed you cannot decide anymore which rels have to be added and deleted as you miss the necessary information in a set of node-entities (there is no deeper, distinguishing semantic to those relationships).

It is correct that this could and should be possible with relationship entities. Having the attribute on the annotation makes sense and was already discussed some time ago.
http://forum.springsource.org/showthread.php?114614

See also DATAGRAPH-105

@spring-projects-issues spring-projects-issues added type: enhancement in: core labels Dec 31, 2020
@spring-projects-issues spring-projects-issues added this to the 2.0 milestone Dec 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core type: enhancement
Projects
None yet
Development

No branches or pull requests

1 participant