We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 77c04db commit 302b538Copy full SHA for 302b538
src/main/java/org/springframework/data/neo4j/core/mapping/DefaultNeo4jPersistentEntity.java
@@ -470,8 +470,9 @@ public Collection<RelationshipDescription> getRelationshipsInHierarchy(Predicate
470
childDescription.getRelationships().forEach(concreteRelationship -> {
471
472
String fieldName = concreteRelationship.getFieldName();
473
+ NodeDescription<?> target = concreteRelationship.getTarget();
474
- if (relationships.stream().noneMatch(relationship -> relationship.getFieldName().equals(fieldName))) {
475
+ if (relationships.stream().noneMatch(relationship -> relationship.getFieldName().equals(fieldName) && relationship.getTarget().equals(target))) {
476
relationships.add(concreteRelationship);
477
}
478
});
0 commit comments