diff --git a/backend/src/main/java/io/metersphere/service/RelationshipEdgeService.java b/backend/src/main/java/io/metersphere/service/RelationshipEdgeService.java index 90896060f2..9a1bb097db 100644 --- a/backend/src/main/java/io/metersphere/service/RelationshipEdgeService.java +++ b/backend/src/main/java/io/metersphere/service/RelationshipEdgeService.java @@ -51,10 +51,9 @@ public class RelationshipEdgeService { } public void delete(String sourceId ,List targetIds) { - RelationshipEdgeExample example = new RelationshipEdgeExample(); - example.createCriteria().andSourceIdEqualTo(sourceId).andTargetIdIn(targetIds); - - relationshipEdgeMapper.deleteByExample(example); + targetIds.forEach(targetId -> { + delete(sourceId, targetId); + }); } /**