Bugfix indirect relationship discovery updates

This commit is contained in:
Ben Bosman
2020-12-17 11:41:02 +01:00
parent 098b273a85
commit 97feeecd95

View File

@@ -437,6 +437,9 @@ public class RelationshipServiceImpl implements RelationshipService {
foundRelationship, itemsToUpdate, max, currentDepth + 1, maxDepth); foundRelationship, itemsToUpdate, max, currentDepth + 1, maxDepth);
} }
} }
} else {
log.debug("skipping " + relationshipType.getID() + " in getRelatedItemsForRightItem for item "
+ item.getID());
} }
} }
return itemsToUpdate; return itemsToUpdate;
@@ -448,6 +451,9 @@ public class RelationshipServiceImpl implements RelationshipService {
if (itemsToUpdate.size() >= max) { if (itemsToUpdate.size() >= max) {
return itemsToUpdate; return itemsToUpdate;
} }
if (currentDepth == maxDepth) {
return itemsToUpdate;
}
List<RelationshipType> relationshipTypes = new LinkedList<>(); List<RelationshipType> relationshipTypes = new LinkedList<>();
EntityType rightType = relationship.getRelationshipType().getRightType(); EntityType rightType = relationship.getRelationshipType().getRightType();
String entityTypeStringFromMetadata = relationshipMetadataService.getEntityTypeStringFromMetadata(item); String entityTypeStringFromMetadata = relationshipMetadataService.getEntityTypeStringFromMetadata(item);
@@ -474,6 +480,9 @@ public class RelationshipServiceImpl implements RelationshipService {
foundRelationship, itemsToUpdate, max, currentDepth + 1, maxDepth)); foundRelationship, itemsToUpdate, max, currentDepth + 1, maxDepth));
} }
} }
} else {
log.debug("skipping " + relationshipType.getID() + " in getRelatedItemsForLeftItem for item "
+ item.getID());
} }
} }
return itemsToUpdate; return itemsToUpdate;