From: Ravi Geda Date: Tue, 12 Jun 2018 13:54:41 +0000 (+0100) Subject: Fix GET ALL for vertices created asynchronously X-Git-Tag: 1.3.0~21^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=aai%2Fgizmo.git;a=commitdiff_plain;h=414eaef56d9f9427712448c22a0c7eec02007ba4;hp=36a7dbfd2672ee6629c4b375df2d6982d942fa43 Fix GET ALL for vertices created asynchronously Vertices created asynchronously are not being returned in the GET ALL vertices. This commit addresses this problem Change-Id: I83ee7a59dc2005447706fa0a43ba2c9d2f0e4592 Issue-ID: AAI-1223 Signed-off-by: Ravi Geda --- diff --git a/src/main/java/org/onap/crud/service/CrudAsyncGraphDataService.java b/src/main/java/org/onap/crud/service/CrudAsyncGraphDataService.java index dc30a4e..5d37acb 100644 --- a/src/main/java/org/onap/crud/service/CrudAsyncGraphDataService.java +++ b/src/main/java/org/onap/crud/service/CrudAsyncGraphDataService.java @@ -202,6 +202,7 @@ public class CrudAsyncGraphDataService extends AbstractGraphDataService { public String addVertex(String version, String type, VertexPayload payload) throws CrudException { // Validate the incoming payload Vertex vertex = OxmModelValidator.validateIncomingUpsertPayload(null, version, type, payload.getProperties()); + vertex.getProperties().put(org.onap.schema.OxmModelValidator.Metadata.NODE_TYPE.propertyName(), type); // Create graph request event GraphEvent event = GraphEvent.builder(GraphEventOperation.CREATE) .vertex(GraphEventVertex.fromVertex(vertex, version)).build();