diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java index 6fb58ae1f3..2ef2b9bcca 100644 --- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java +++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java @@ -469,27 +469,26 @@ public EntityMutationResponse mapAttributesAndClassifications(EntityMutationCont throw baseException; } } - } else { - - if (CollectionUtils.isNotEmpty(appendEntities)) { - for (AtlasEntity entity : appendEntities) { - String guid = entity.getGuid(); - AtlasVertex vertex = context.getVertex(guid); - AtlasEntityType entityType = context.getType(guid); - mapAppendRemoveRelationshipAttributes(entity, entityType, vertex, UPDATE, context, true, false); - } + } + if (CollectionUtils.isNotEmpty(appendEntities)) { + for (AtlasEntity entity : appendEntities) { + String guid = entity.getGuid(); + AtlasVertex vertex = context.getVertex(guid); + AtlasEntityType entityType = context.getType(guid); + mapAppendRemoveRelationshipAttributes(entity, entityType, vertex, UPDATE, context, true, false); } + } - if (CollectionUtils.isNotEmpty(removeEntities)) { - for (AtlasEntity entity : removeEntities) { - String guid = entity.getGuid(); - AtlasVertex vertex = context.getVertex(guid); - AtlasEntityType entityType = context.getType(guid); - mapAppendRemoveRelationshipAttributes(entity, entityType, vertex, UPDATE, context, false, true); - } + if (CollectionUtils.isNotEmpty(removeEntities)) { + for (AtlasEntity entity : removeEntities) { + String guid = entity.getGuid(); + AtlasVertex vertex = context.getVertex(guid); + AtlasEntityType entityType = context.getType(guid); + mapAppendRemoveRelationshipAttributes(entity, entityType, vertex, UPDATE, context, false, true); } } + if (CollectionUtils.isNotEmpty(context.getEntitiesToDelete())) { deleteDelegate.getHandler().deleteEntities(context.getEntitiesToDelete()); } @@ -516,7 +515,6 @@ public EntityMutationResponse mapAttributesAndClassifications(EntityMutationCont return resp; } - private void setSystemAttributesToEntity(AtlasVertex entityVertex, AtlasEntity createdEntity) { createdEntity.setCreatedBy(GraphHelper.getCreatedByAsString(entityVertex));