Commit 0b9d7113 by apoorvnaik

ATLAS-2703: Fix in Term DTO mapping

Change-Id: I23b53086b2bb2380f451e7d85b59096edc610181
parent 4dc6284e
...@@ -21,6 +21,7 @@ import org.apache.atlas.exception.AtlasBaseException; ...@@ -21,6 +21,7 @@ import org.apache.atlas.exception.AtlasBaseException;
import org.apache.atlas.model.glossary.AtlasGlossaryTerm; import org.apache.atlas.model.glossary.AtlasGlossaryTerm;
import org.apache.atlas.model.instance.AtlasEntity; import org.apache.atlas.model.instance.AtlasEntity;
import org.apache.atlas.model.instance.AtlasRelatedObjectId; import org.apache.atlas.model.instance.AtlasRelatedObjectId;
import org.apache.atlas.model.instance.AtlasRelationship;
import org.apache.atlas.type.AtlasTypeRegistry; import org.apache.atlas.type.AtlasTypeRegistry;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
...@@ -86,7 +87,10 @@ public class AtlasGlossaryTermDTO extends AbstractGlossaryDTO<AtlasGlossaryTerm> ...@@ -86,7 +87,10 @@ public class AtlasGlossaryTermDTO extends AbstractGlossaryDTO<AtlasGlossaryTerm>
for (Object assignedEntity : (Collection) assignedEntities) { for (Object assignedEntity : (Collection) assignedEntities) {
if (assignedEntity instanceof AtlasRelatedObjectId) { if (assignedEntity instanceof AtlasRelatedObjectId) {
AtlasRelatedObjectId id = (AtlasRelatedObjectId) assignedEntity; AtlasRelatedObjectId id = (AtlasRelatedObjectId) assignedEntity;
ret.addAssignedEntity(id); // Since the edges are not a hard delete we need to filter the DELETED ones
if (id.getRelationshipStatus() == AtlasRelationship.Status.ACTIVE) {
ret.addAssignedEntity(id);
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment