diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityGraphDiscoveryV2.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityGraphDiscoveryV2.java index 2937ae2af2..a393742d38 100644 --- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityGraphDiscoveryV2.java +++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasEntityGraphDiscoveryV2.java @@ -358,6 +358,7 @@ private void visitRelationships(AtlasEntityType entityType, AtlasEntity entity, for (String attrName : entityType.getRelationshipAttributes().keySet()) { // if attribute is not in 'relationshipAttributes', try 'attributes' + // if appendRelationshipAttribute exists try attrName there if (entity.hasRelationshipAttribute(attrName)) { Object attrVal = entity.getRelationshipAttribute(attrName); String relationshipType = AtlasEntityUtil.getRelationshipType(attrVal); @@ -374,6 +375,15 @@ private void visitRelationships(AtlasEntityType entityType, AtlasEntity entity, visitAttribute(attribute.getAttributeType(), attrVal, entity.getGuid()); visitedAttributes.add(attrName); + } else if (entity.hasAppendRelationshipAttribute(attrName)){ + Object attrVal = entity.getRelationshipAttribute(attrName); + String relationshipType = AtlasEntityUtil.getRelationshipType(attrVal); + AtlasAttribute attribute = entityType.getRelationshipAttribute(attrName, relationshipType); + + visitAttribute(attribute.getAttributeType(), attrVal, entity.getGuid()); + + visitedAttributes.add(attrName); + } } }