This is an automated email from the ASF dual-hosted git repository.
amestry pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new 6cc3cf6 ATLAS-3965: Relationships with null values are missing in
entity relationshipAttributes
6cc3cf6 is described below
commit 6cc3cf6b434e719b79434a01ea6eedaf3a3c0afd
Author: Deep Singh <[email protected]>
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 <[email protected]>
---
.../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;