Update ownercheck side effect 16/112516/2
authorRodrigo Lima <rodrigo.lima@yoppworks.com>
Thu, 10 Sep 2020 20:36:12 +0000 (16:36 -0400)
committerRodrigo Lima <rodrigo.lima@yoppworks.com>
Fri, 11 Sep 2020 14:25:22 +0000 (10:25 -0400)
- Use both E and both V to select owning entity

Issue-ID: AAI-3176
Signed-off-by: Rodrigo Lima <rodrigo.lima@yoppworks.com>
Change-Id: I2e453dfd3c52c0de67981b8344434576fc514d0f

aai-core/src/main/java/org/onap/aai/introspection/sideeffect/OwnerCheck.java

index a32c4ec..061c640 100644 (file)
@@ -48,8 +48,8 @@ public class OwnerCheck extends SideEffect {
         if (serializer.getGroups() != null && !serializer.getGroups().isEmpty()) {
             List<Vertex> owningEntity = self.graph().traversal()
                 .V(self)
-                .inE("org.onap.relationships.inventory.BelongsTo")
-                .outV()
+                .bothE("org.onap.relationships.inventory.BelongsTo")
+                .otherV()
                 .has("aai-node-type", "owning-entity")
                 .toList();