Skip to content

Commit

Permalink
Merge pull request #3999 from atlanhq/fixentitymutations
Browse files Browse the repository at this point in the history
FT-857 | Fixed entity mutations with relations
  • Loading branch information
aarshi0301 authored Jan 22, 2025
2 parents 617f4de + c956013 commit 9435fb2
Showing 1 changed file with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -470,27 +470,27 @@ 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());
}
Expand Down

0 comments on commit 9435fb2

Please sign in to comment.