Commit cda7f56d by David Radley Committed by Madhan Neethiraj

ATLAS-1901: Tolerate no propogatetags on Relationshipdef

parent 24a106b4
...@@ -480,7 +480,12 @@ public class AtlasRelationshipDefStoreV1 extends AtlasAbstractDefStoreV1 impleme ...@@ -480,7 +480,12 @@ public class AtlasRelationshipDefStoreV1 extends AtlasAbstractDefStoreV1 impleme
vertex.setProperty(Constants.RELATIONSHIPTYPE_END2_KEY, AtlasType.toJson(relationshipDef.getEndDef2())); vertex.setProperty(Constants.RELATIONSHIPTYPE_END2_KEY, AtlasType.toJson(relationshipDef.getEndDef2()));
// Update RelationshipCategory // Update RelationshipCategory
vertex.setProperty(Constants.RELATIONSHIPTYPE_CATEGORY_KEY, relationshipDef.getRelationshipCategory().name()); vertex.setProperty(Constants.RELATIONSHIPTYPE_CATEGORY_KEY, relationshipDef.getRelationshipCategory().name());
vertex.setProperty(Constants.RELATIONSHIPTYPE_TAG_PROPAGATION_KEY, relationshipDef.getPropagateTags().name());
if (relationshipDef.getPropagateTags() == null) {
vertex.setProperty(Constants.RELATIONSHIPTYPE_TAG_PROPAGATION_KEY, AtlasRelationshipDef.PropagateTags.NONE.name());
} else {
vertex.setProperty(Constants.RELATIONSHIPTYPE_TAG_PROPAGATION_KEY, relationshipDef.getPropagateTags().name());
}
} }
private AtlasRelationshipDef toRelationshipDef(AtlasVertex vertex) throws AtlasBaseException { private AtlasRelationshipDef toRelationshipDef(AtlasVertex vertex) throws AtlasBaseException {
......
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