You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by am...@apache.org on 2020/10/02 16:19:29 UTC
[atlas] branch master updated: ATLAS-3965: Relationships with null
values are missing in entity relationshipAttributes
This is an automated email from the ASF dual-hosted git repository.
amestry pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/master by this push:
new 877e2b1 ATLAS-3965: Relationships with null values are missing in entity relationshipAttributes
877e2b1 is described below
commit 877e2b1729f3628d844c32769c30a3c948d567a6
Author: Deep Singh <de...@gmail.com>
AuthorDate: Wed Sep 30 14:17:59 2020 -0700
ATLAS-3965: Relationships with null values are missing in entity relationshipAttributes
Signed-off-by: Ashutosh Mestry <am...@cloudera.com>
---
.../atlas/repository/store/graph/v2/EntityGraphRetriever.java | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java
index 00146b1..2199277 100644
--- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java
+++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java
@@ -1352,12 +1352,11 @@ public class EntityGraphRetriever {
break;
}
- if (ret != null) {
- entity.setRelationshipAttribute(attributeName, ret);
+ // Set Relationship attributes, even if the value is null
+ entity.setRelationshipAttribute(attributeName, ret);
- if (attributeEndDef.getIsLegacyAttribute() && !entity.hasAttribute(attributeName)) {
- entity.setAttribute(attributeName, toLegacyAttribute(ret));
- }
+ if (attributeEndDef.getIsLegacyAttribute() && !entity.hasAttribute(attributeName)) {
+ entity.setAttribute(attributeName, toLegacyAttribute(ret));
}
return ret;