Commit bf5f8ef0 by apoorvnaik

ATLAS-2553: Glossary (DataAccess fix)

Change-Id: Ia3222215ee527357fdc264445939e94e1afde068
parent 54c31d5c
...@@ -882,7 +882,7 @@ public class GlossaryService { ...@@ -882,7 +882,7 @@ public class GlossaryService {
if (DEBUG_ENABLED) { if (DEBUG_ENABLED) {
LOG.debug("Creating relation between glossary = {} and term = {}", glossaryTerm.getAnchor().getGlossaryGuid(), saved.getGuid()); LOG.debug("Creating relation between glossary = {} and term = {}", glossaryTerm.getAnchor().getGlossaryGuid(), saved.getGuid());
} }
createRelationship(defineTermAnchorRelation(glossaryTerm.getAnchor().getGlossaryGuid(), glossaryTerm.getGuid())); createRelationship(defineTermAnchorRelation(glossaryTerm.getAnchor().getGlossaryGuid(), saved.getGuid()));
} }
} }
......
...@@ -71,19 +71,6 @@ public class DataAccess { ...@@ -71,19 +71,6 @@ public class DataAccess {
throw new AtlasBaseException(AtlasErrorCode.DATA_ACCESS_SAVE_FAILED, obj.toString()); throw new AtlasBaseException(AtlasErrorCode.DATA_ACCESS_SAVE_FAILED, obj.toString());
} }
// Since mutation context has guid information, attempt to set the same.
if (entityMutationResponse.getFirstEntityCreated() != null) {
if (LOG.isDebugEnabled()) {
LOG.debug("Object created");
}
obj.setGuid(entityMutationResponse.getFirstEntityCreated().getGuid());
} else if (entityMutationResponse.getFirstEntityUpdated() != null) {
if (LOG.isDebugEnabled()) {
LOG.debug("Object updated");
}
obj.setGuid(entityMutationResponse.getFirstEntityUpdated().getGuid());
}
return this.load(obj); return this.load(obj);
} finally { } finally {
......
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